Monitor NGiNX with Nixstats


The following metrics are submitted to Nixstats.

  • Requests per second
  • Accepts per second
  • Handled per second
  • Total requests
  • Active connections
  • Writing
  • Waiting
  • Reading


  • urllib2
  • nginx compiled with --with-http_stub_status_module parameter

Stub status page

To enable the nginx stub status page add the following code to your nginx site-enabled configuration file.

server {
    server_name localhost;
    location /status_page {
        stub_status on;
        deny all;

The status page will only be available from the machine running NGiNX. If you have something else running on port 8080 feel free to change this to an available port.

You can test if the status page is working by running
wget -qO-

Configure the plugin

To enable the plugin edit the nixstats configuration file. This file is usually located at /etc/nixstats.ini.

Add the following settings to the end of the file.

enabled = yes
status_page_url =

Test to see if the plugin is working by running nixstatsagent --test nginx. It should show the following metrics:

    "accepts": 505768,
    "accepts_per_second": 0.0,
    "active_connections": 198,
    "handled": 505768,
    "handled_per_second": 0.0,
    "reading": 0,
    "requests": 8335225,
    "requests_per_second": 0.0,
    "waiting": 196,
    "writing": 2

Now you can restart the agent service nixstatsagent restart to start monitoring NGiNX.


  1. yandex/gixy: Nginx configuration static analyzer
  2. NAXSI – Nginx的开源、高性能、Low Rules维护的Web防火墙
  3. How To Create a Self-Signed SSL Certificate for Nginx in Ubuntu 16.04
  4. 实例讲解基于 Flask+React 的全栈开发和部署
  5. nginx try_files with a proxy_pass