Configuring Munin To Monitor Nginx Ubuntu LTS

Hi,

I’m having 2 servers:

Server1: Munin running on Apache.
Server2: Nginx, Varnish and Apache.

I would like Munin (server1) to monitor Apache and Nginx. I have the node installed and Munin is reading some default graphs from server2. I just had no luck installing Nginx plugin. Any detailed help please?

What kind of problem(s) are you having with the nginx plugin. Which of the plugins are you using?

Thanks for the response Evert! I have been struggling a lot!

NginX graphs are not showing at all. On that server, I have Varnish on port 80, then traffic is going to NginX on port 81, then traffic goes to Apache on port 8080. Only Varnish graphs are displayed on Munin. I guess I should update Munin to monitor ports 8080 and 81?

If you’re running nginx on a non-standard port, you do have to pass that port on to munin. The recommended way is via /etc/munin/munin-node.conf , but I usually just ‘hack’ the plugins.

Find occurances of

and replace them with

Maybe this is why graphs are not showing any data?

So you have graphs, but they flatline? Yup, this could be the reason.

Which plugin are you using? nginx_combined ? nginx_status? some other plugin?

Here is the list of plugins in the /etc/munin/plugins folder:
cpu | iostat_ios | threads | df | irqstats | uptime | df_inode | load | varnish_backend_traffic | diskstats
memory | varnish_expunge | entropy | nginx_memory | varnish_hit_rate | forks | nginx_request
varnish_memory_usage | fw_conntrack | nginx_status | varnish_objects | fw_forwarded_local | nginx_traffic
varnish_request_rate | fw_packets | open_files | varnish_threads | if_err_eth0 | open_inodes | varnish_transfer_rates
if_eth0 | processes | varnish_uptime | interrupts | proc_pri | vmstat | iostat | swap

Attached is how the graph looking like.

It is working now. Only the plugin nginx_traffic is not working. The graph does not show on Munin monitoring page.

The recommended way is via /etc/munin/munin-node.conf , but I usually just ‘hack’ the plugins.

Instead of “hack”, just add on /etc/munin/plugin-conf.d/munin-node

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

1 Like