Introduction to the method of using Nginx Plus for online activity monitoring functions _nginx

Source: Internet
Author: User
Tags nginx server

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.