Last active
June 16, 2024 05:50
-
-
Save mgaebler/055a08827cdfb95fa84a4a5d7ef2255b to your computer and use it in GitHub Desktop.
NGINX: Custom JSON status page with stub_status
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make sure the ngx_http_stub_status_module is installed correctly. | |
location /status { | |
add_header Content-Type application/json; | |
return 200 '{\r | |
"connections_active": $connections_active,\r | |
"connections_reading": $connections_reading,\r | |
"connections_writing": $connections_writing,\r | |
"connections_waiting": $connections_waiting | |
}'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment