NGINX

Monitor active connections, connection states, and request rates from your local NGINX server. The agent probes the NGINX stub status module to collect real-time performance data, helping you track traffic spikes and server load.

Setup

Preparing NGINX for monitoring requires enabling and configuring the stub_status directive so the agent can probe it locally.

  1. Create a status configuration: Add a minimal site configuration to expose statistics. For example, create /etc/nginx/sites-enabled/status.conf:
    server {
        listen 127.0.0.1:80;
        listen [::1]:80;
    
        location /nginx_status {
            stub_status on;
            allow 127.0.0.1;
            allow ::1;
            deny all;
        }
    }
  2. Restart NGINX: Validate your syntax with sudo nginx -t and then reload the service with sudo systemctl reload nginx.
  3. Restart the agent: Restart simob to trigger service discovery for the new endpoint: sudo systemctl restart simob.
  4. Enable in UI: Once discovered (within a few seconds), explicitly enable the NGINX collector in your dashboard’s server configuration panel.

Configuration

The agent automatically discovers the NGINX stub status if it’s exposed on localhost:80/nginx_status. No additional configuration is required.

Metrics

The following metrics are collected from the stub status module:

MetricTypeUnitDescription
nginx_connections_active_totalGauge-Number of active client connections.
nginx_connections_reading_totalGauge-Connections where NGINX is reading requests.
nginx_connections_writing_totalGauge-Connections where NGINX is writing responses.
nginx_connections_waiting_totalGauge-Idle connections waiting for requests.
nginx_requests_totalCounterreqsTotal number of client requests since start.
nginx_requests_rateGaugereqs/sRate of requests per second.

Troubleshooting

Verify the endpoint

Test locally using curl to ensure NGINX is correctly exposing statistics:

curl http://127.0.0.1/nginx_status

Discovery delay

After enabling the collector in the UI, it may take up to 5 minutes for the change to propagate to the agent. Ensure you have restarted the agent if the service was just configured.