NGINX
Monitor active connections, connection states, and request rates from the local NGINX server.
The agent probes the NGINX stub status module exposed on localhost
.
You need to enable and configure the stub_status
directive for the collector to work.
Configuration
Add a small site configuration to expose NGINX statistics locally:
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 after adding this file. The collector will then scrape metrics from
http://localhost/nginx_status
.
Metrics
Metric | Description |
---|---|
nginx_connections_active_total |
Number of active client connections |
nginx_connections_reading_total |
Connections where NGINX is reading requests |
nginx_connections_writing_total |
Connections where NGINX is writing responses |
nginx_connections_waiting_total |
Idle connections waiting for requests |
nginx_requests_total |
Total number of client requests since start |
nginx_requests_rate |
Rate of requests per second |