Nginx and Munin

To be allowed to show Nginx graphs on the Munin report, it is required to enable nginx status and to listen on:

http://127.0.0.1/nginx_status

To do this, we just need to add the following code on /etc/nginx/sites-enabled/default or into any other site file (like create a new one /etc/nginx/sites-available/status and then make symbolic link to site-enabled directory):

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;
    }
}

Source: Server Fault

Leave a Reply

Your email address will not be published. Required fields are marked *

Are you human? *

This site uses Akismet to reduce spam. Learn how your comment data is processed.