« back

Nginx Plugins for Munin

Sep 29 2009 // Comments

Quick Howto: Install Munin plugins to monitor Nginx

Super quick howto configure munin to monitor nginx.

  1. download nginx plugins from Munin Exchange
  2. have nginx compiled with --with-http_stub_status_module -- it's off by default, so you might need to recompile from source; compiling nginx is out-of-scope for this howto, you can read about it here
  3. configure nginx to display /nginx_status location /nginx_status { stub_status on; access_log off; allow 127.0.0.1; deny all; } note: test the status page from localhost; you can simply telnet localhost 80 and type GET /nginx_status to see the results. If you don't get the nginx status page, then check that your nginx config is properly configured to listen on localhost port 80.
  4. configure munin plugins with url, add: [nginx*] env.url http://localhost/nginx_status
  5. restart munin-node's
  6. enjoy nginx monitor graphs

Troubleshooting

If you get this: Name "main::port" used only once: possible typo at /etc/munin/plugins/nginx_request line 49. -- just remove the $port reference in the nginx_request plugin; far as I can tell it's never used; didn't seem important to me

Comments