Want to know what your NGINX server is now? Was it a DoS attack, or was there a bunch of bugs on the site?
NGINX Plus now launches a real-time active monitoring interface that provides critical load (key load) and performance monitoring. With a simple RESTful JSON interface, connecting real-time monitoring statistics (stats to live dashboards) and third-party monitoring tools becomes lightly loosened.
NGINX Plus Balanced load state real-time monitoring
Details: Online activity monitoring –json feeds
Enabling this status hint in Nginx plus simply adds state processing to the server configuration:
Copy Code code as follows:
Location =/status {
Allow 192.168.0.0/16; # permit access from the local network
Deny all; # Deny access from everywhere else
Status
}
If you request/status (or any URI that matches the location group), NGINX Plus responds to a JSON document containing the currently active data:
- Basic version, startup length and identifying information;
- Total number of connections and requests;
- The request and corresponding count of each state area;
- Requests and response techniques for each upstream server, as well as health checks and start-up statistics;
- The table data for each named cache region.
You can continue to extract a subset of the data, or use the Restfull method to get a single data point:
Detail: Lifecycle Monitoring-Web pages
NGINX plus comes with a simple Web page (/usr/share/nginx/html/status.html) that polls for state information and displays it in a simple table. You can use the following configuration to enable this request http://host:8080/status.html:
Copy Code code as follows:
server {
Listen 8080;
root/usr/share/nginx/html;
Location =/status {
Status
}
}
For more information, check the status module configuration instructions.