Percona Nginx Monitoring Template for Cacti

These templates use ss_get_by_ssh.php to connect to a server via SSH and extract statistics from the Nginx server running there, by executing the wget program with the url /server-status.

Installation

Once the SSH connection is working, configure Nginx to report its status. You can add the following to any server context and restart Nginx:

location /server-status {
   stub_status on;
   allow 127.0.0.1
   # deny all;
}

If you decide to use a different URL, you’ll have to configure that in the script configuration (covered in the general install guide) or pass a command-line option (also covered in the general install guide).

Finally, test one of your hosts like this. You may need to change some of the example values below, such as the cacti username and the hostname you’re connecting to:

sudo -u cacti php /usr/share/cacti/scripts/ss_get_by_ssh.php --type nginx --host 127.0.0.1 --items hw,hx

Sample Graphs

The following sample graphs demonstrate how the data is presented.

../_images/nginx_accepts_handled.png

The number of connections the server accepted and handled.

../_images/nginx_requests.png

The number of requests the Nginx server received.

../_images/nginx_scoreboard.png

The number of connections to the Nginx server in various states.

Percona Monitoring Plugins
Call Us
+1-888-316-9775 (USA - Sales)
+1-208-473-2904 (USA - Sales)
+44-208-133-0309 (UK - Sales)
0-800-051-8984 (UK - Sales)
0-800-181-0665 (GER - Sales)
+1-877-862-4316 (Emergency)
+1-855-55TRAIN (Training)
+1-925-271-5054 (Training)

Table Of Contents

Previous topic

Percona MongoDB Monitoring Template for Cacti

Next topic

Percona OpenVZ Monitoring Template for Cacti



© Copyright 2012, Percona Inc.
Except where otherwise noted, this documentation is licensed under the following license:
CC Attribution-ShareAlike 2.0 Generic
{@ footer_documentation_bugs @}
This documentation is developed in Launchpad as part of the Percona Monitoring Plugins source code.
If you spotted innacuracies, errors, don't understood it or you think something is missing or should be improved, please file a bug.
{@ /footer_documentation_bugs @} ]]>