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.


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;
   # 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 --items hw,hx

Sample Graphs

The following sample graphs demonstrate how the data is presented.


The number of connections the server accepted and handled.


The number of requests the Nginx server received.


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

© Copyright 2012, Percona Inc.
Except where otherwise noted, this documentation is licensed under the following license:
CC Attribution-ShareAlike 2.0 Generic
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.