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

NameDefault 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 NameDisplay NameDescription
nginx.connections.activeNginx ConnectionsNumber of all open connections including connections to backends.
nginx.connections.readingNginx Reading ConnectionsNginx reads the request header.
nginx.connections.writingNginx Writing ConnectionsNginx reads the request body, processes the request or writes response to a client.
nginx.connections.waitingNginx Waiting ConnectionsKeep-alive connections, actually it will be active - (reading + writing).
nginx.requests.handledNginx Handled RequestsThe number of requests served by connections handled by Nginx.
nginx.requests_rateNginx Requests RateAverage number of requests per second.
nginx.connections_rateNginx Connections RateAverage number of connections per second.
nginx.perconnections_requestsNginx Requests per connectionAverage number of requests per connection.
nginx.response.timeNginx Response TimeTime taken for Nginx request-response.