Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I would like to monitor NGinx stats through Munin but the Nginx plugins show no data. Is it possible to diagnose why only one of the munin nginx plugins seems to be working?

nginx munin

The server runs on CentOS 5.3

share|improve this question

3 Answers 3

up vote 8 down vote accepted

The nginx plugins rely on the following URL to get the status info:

http://127.0.0.1/nginx_status

Usually, nginx does not have this URL configured to show status data.

From the documentation of the plugins, I see that nginx needs to be configured to show status data in a spesific URL.

You need to enable nginx status by adding the following lines to the site's configuration:

 server {
       listen 127.0.0.1;
       server_name localhost;
       location /nginx_status {
               stub_status on;
               access_log   off;
               allow 127.0.0.1;
               deny all;
       }
 }

Don't forget to restart the server after adding this configuration, and make sure the stus URL returns the status data.

For the complete documentation of each plugin, you can run:

munindoc nginx_request

Hope this helps.

share|improve this answer

Possibly helpful:

cd /etc/munin/plugins
munin-run PLUGINNAME

Additionally use the debug option to munin-run.

Check the plugin file for any hard coded paths and verify they are correct for your system:

grep '/' PLUGINNAME

The nginx plugin may rely on Nginx being compiled with certain modules or log output in a certain format. Is there any documentation page for the plugins?

share|improve this answer

Key thing is the url in munin config.

You will need

[nginx*]
env.url http://localhost/nginx_status

Note

nginx_status

Not

nginx-status
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.