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.
- 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; } } - Restart NGINX: Validate your syntax with
sudo nginx -tand then reload the service withsudo systemctl reload nginx. - Restart the agent: Restart
simobto trigger service discovery for the new endpoint:sudo systemctl restart simob. - 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:
| Metric | Type | Unit | Description |
|---|---|---|---|
nginx_connections_active_total | Gauge | - | Number of active client connections. |
nginx_connections_reading_total | Gauge | - | Connections where NGINX is reading requests. |
nginx_connections_writing_total | Gauge | - | Connections where NGINX is writing responses. |
nginx_connections_waiting_total | Gauge | - | Idle connections waiting for requests. |
nginx_requests_total | Counter | reqs | Total number of client requests since start. |
nginx_requests_rate | Gauge | reqs/s | Rate 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.