Collector Type: Agent
Category: Application Monitors
Application Name: Nginx
Global Template Name: LINUX Nginx Template
Introduction
NGINX is a web server that can also be used as a reverse proxy, load balancer, mail proxy, and HTTP cache. The software was created by Igor Sysoev and publicly released in 2004.
Nginx can be monitored by enabling the Stub Status module. You need to make sure that your version of Nginx was compiled with the Stub Status module.
On Ubuntu, the Nginx package comes with Stub Status compiled in. So if we install Nginx via apt-get or aptitude, it is enabled by default.
Make sure to have the following configuration under the server block in the Nginx config file. This enables the status handler in this location.
location /nginx_status {
stub_status on;
access_log off;
allow 127.0.0.1;
deny all;
}
Parameters
Name | Default Value |
---|---|
Host IP Address The host on which Nginx is running. | 127.0.0.1 |
Protocol The protocol to be used. | http |
Port The port on which Nginx is running. | 80 |
URI The Uri for getting stub status of Nginx. | nginx_status |
User Name The username of the server, if authentication is enabled. | NA |
Password The password of the server, if authentication is enabled. | NA |
Note: All field attributes are mandatory, use default values wherever applicable.
Collected Metrics
Metric Name | Display Name | Description |
---|---|---|
nginx.connections.active | Nginx Connections | Number of all open connections including connections to backends. |
nginx.connections.reading | Nginx Reading Connections | Nginx reads the request header. |
nginx.connections.writing | Nginx Writing Connections | Nginx reads the request body, processes the request or writes response to a client. |
nginx.connections.waiting | Nginx Waiting Connections | Keep-alive connections, actually it will be active - (reading + writing). |
nginx.requests.handled | Nginx Handled Requests | The number of requests served by connections handled by Nginx. |
nginx.requests_rate | Nginx Requests Rate | Average number of requests per second. |
nginx.connections_rate | Nginx Connections Rate | Average number of connections per second. |
nginx.perconnections_requests | Nginx Requests per connection | Average number of requests per connection. |
nginx.response.time | Nginx Response Time | Time taken for Nginx request-response. |