Nginx
Nginx is a high-performance web server, reverse proxy, and load balancer.
Auto-Detection
Section titled “Auto-Detection”Glouton detects Nginx by its process and listening port (default: 80).
To enable metrics gathering, ensure Glouton can access the Nginx status page at http://server-address/nginx_status. Add the following to your site definition (e.g. /etc/nginx/sites-enabled/default):
location /nginx_status { stub_status on;}If your Nginx build does not include stub_status, see the ngx_http_stub_status_module documentation.
When using Docker, you can set http_path and http_host via labels:
docker run --label glouton.http_path="/readiness" --label glouton.http_host="my-host" [...]If auto-detected parameters are incorrect, override them manually:
sudo tee /etc/glouton/conf.d/99-nginx.conf > /dev/null << 'EOF'service: # For an Nginx running outside a container - type: "nginx" address: "127.0.0.1" port: 80 # HTTP listener, agent does not support HTTPS here http_path: "/" # Path used for availability check, not metrics gathering http_host: "127.0.0.1:80" # Host header sent
# 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_path: "/" http_host: "127.0.0.1:81"
# For an Nginx running in a Docker container - type: "nginx" instance: "CONTAINER_NAME" address: "172.17.0.2" port: 80 http_path: "/" http_host: "127.0.0.1:80"EOFCreate or edit C:\ProgramData\glouton\conf.d\99-nginx.conf:
service: # For an Nginx running outside a container - type: "nginx" address: "127.0.0.1" port: 80 # HTTP listener, agent does not support HTTPS here http_path: "/" # Path used for availability check, not metrics gathering http_host: "127.0.0.1:80" # Host header sent
# 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_path: "/" http_host: "127.0.0.1:81"Glouton automatically detects configuration changes.
Health Check
Section titled “Health Check”Glouton performs an HTTP check on the configured port and path to verify that Nginx is responding.
Built-in Metrics
Section titled “Built-in 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 active client connections to Nginx |
nginx_connections_waiting | Number of idle client connections waiting for a request |
nginx_connections_reading | Number of connections where Nginx is reading the request header |
nginx_connections_writing | Number of connections where Nginx is writing the response |
Glouton collects Nginx access and error logs for analysis in Bleemeo.