Nginx
Auto-Discovery
Health Check
Metrics
Logs
Agent uses a HTTP check if the service listen on port 80.
To enable metrics gathering, ensure Bleemeo agent can access nginx status
on the URL http://server-address/nginx_status. This usually means you should add the
following to your site definition (e.g. /etc/nginx/sites-enabled/default):
location /nginx_status { stub_status on;}If your nginx is not build with stub_status or if you need more information about nginx stub_status, see https://nginx.org/en/docs/http/ngx_http_stub_status_module.html
If some auto-detected parameters are wrong, you can manually override them
by adding the following to /etc/glouton/conf.d/99-local.conf:
service: [...]
# For an nginx running outside a container - type: "nginx" address: "127.0.0.1" port: 80 # HTTP listener, Agent don't support HTTPS here http_path: "/" # This is the path used for availability check, not metrics gathering. http_host: "127.0.0.1:80" # Host header sent. Like other option, you can omit them and default value will be used.
# For an additional nginx running outside a container - type: "nginx" instance: "NAME_ASSOCIATED_WITH_YOUR_ADDITIONAL_SERVICE" address: "127.0.0.1" port: 81 # HTTP listener, Agent don't support HTTPS here http_path: "/" # This is the path used for availability check, not metrics gathering. http_host: "127.0.0.1:81" # Host header sent. Like other option, you can omit them and default value will be used.
# For an nginx running in a Docker container - type: "nginx" instance: "CONTAINER_NAME" address: "172.17.0.2" port: 80 # HTTP listener, Agent don't support HTTPS here http_path: "/" # This is the path used for availability check, not metrics gathering. http_host: "127.0.0.1:80" # Host header sent. Like other option, you can omit them and default value will be used.When using Docker, you may use Docker labels to set http_path and http_host:
docker run --label glouton.http_path="/readiness" --label glouton.http_host="my-host" [...]Agent gathers the following metrics:
| Metric | Description |
|---|---|
| service_status | Status of nginx |
| nginx_requests | Number of requests per second |
| nginx_connections_accepted | Number of client connections established per second |
| nginx_connections_handled | Number of client connections processed per second |
| nginx_connections_active | Number of client connections to nginx server |
| nginx_connections_waiting | Number of idle client connections waiting for a request |
| nginx_connections_reading | Number of client connections where nginx is reading the request header |
| nginx_connections_writing | Number of client connections where nginx is writing the response |