Ever needed to know what’s going on right now with your NGINX Plus server? Do you suspect a DoS attack, or are users reporting errors from your website?

NGINX Plus includes a real-time activity monitoring interface that provides key load and performance metrics. Using a simple RESTful JSON interface, it’s very easy to connect these stats to live dashboards and third-party monitoring tools.

Live status information from NGINX Plus

The live activity monitoring data is generated by a special NGINX Plus handler named status. You can configure live activity monitoring as follows:

server {
    listen 8080;
    root /usr/share/nginx/html;

    # Redirect requests for / to /status.html
    location = / {
        return 301 /status.html;
    }

    location = /status.html { }

    # Everything beginning with /status (except for /status.html) is
    # processed by the status handler
    location /status {
        status;
    }
}

In Detail – The Live Activity Monitoring JSON Feed

To enable the status URL in NGINX Plus, add the status handler to your server configuration:

location /status {
    allow 192.168.0.0/16; # permit access from local network
    deny all; # deny access from everywhere else

    status;
}

When you access /status (or whichever URI matches the location directive), NGINX Plus returns a JSON document containing the current activity data:

  • Basic version, uptime, and identification information
  • Total connections and requests
  • Request and response counts for each status zone
  • Request and response counts per server in each upstream group, plus health-check and uptime statistics
  • Instrumentation for each named cache zone

You can drill down to obtain subsets of the data, or single data points using a RESTful approach:


extended-status

Drill down to the data you need with NGINX Plus’ live activity monitoring


For more information, check out the reference documentation and Live Activity Monitoring of NGINX Plus in 3 Simple Steps.