1. Home
  2. Docs
  3. Monitoring
  4. Linux addons
  5. Web Servers
  6. Nginx

Nginx

Description

It gathers performance metrics about Nginx web server.

Features:

  • Requests received per second
  • Connections received per second
  • Number of nginx processes
  • Number of active connections
  • Accepted connections per second
  • Number of requests in each state:­ waiting, reading, writing

Requirements

  • Nginx version >= 1.7
  • Nginx status module must be enabled.

Setup

  1. Enable status module adding this location to your nginx vhost configuration. The location block should be inside the server block of your site.
server {
    …
    location /nginx_status {
        stub_status on;    # activate stub_status module 
        access_log off;
        allow 127.0.0.1;   # restrict access to local only 
        deny all;
    }
    …
}
  1. Verify and restart nginx
$ sudo nginx -t
$ sudo service nginx restart
Was this article helpful to you? Yes No

How can we help?