Nginx Munin plugin shows no data

muninnginx

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

Best Answer

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.

Related Topic