Multiple munin-nodes per machine

jmxmunin

I'm collecting statistics remotely through JMX. The munin JMX plugin allows you to select an URL to connect to when aggregating statistics. This allows me to collect statistics from hosts which do not actually have munin-node installed. I find this a desirable property for some systems where I am hindered to install munin-node.

How I work today is that if i want to collect JMX stats from machine A without munin-node, I install munin-node on machine B. Machine B then collects data from A via JMX, and reports it to munin-server, which runs on machine C.

This setup requires multiple B-type machines: one per C-type machine. I would like to avoid this and instead use only one B-type machine to collect the data from all A-type machines and reports it to the only munin-server (C-type machine).

As far as I understand this requires running multiple munin-nodes on B or in some other way report to munin-server that the B-type machine is reporting data from multiple sources. Is this possible?

Thank you.

Best Answer

Create multiple symlinks for the plugins under /etc/munin/plugins and create different configuration for each host you are graphing. Something like this:

### Plugins for host 1
/etc/munin/plugins/jmx_host1_GCCount -> /usr/share/munin/plugins/jmx_
/etc/munin/plugins/jmx_host1_ThreadsPeak -> /usr/share/munin/plugins/jmx_

...

### Plugins for host 2
/etc/munin/plugins/jmx_host2_GCCount -> /usr/share/munin/plugins/jmx_
/etc/munin/plugins/jmx_host2_ThreadsPeak -> /usr/share/munin/plugins/jmx_

...

Then in /etc/munin/plugin-conf.d/jmx:

[jmx_host1_*]
env.ip 192.168.0.101
env.port 5900
env.category jvm
env.username foobar
env.password raboof

[jmx_host2_*]
env.ip 192.168.0.102
env.port 5900
env.category jvm
env.username foobar
env.password raboof
Related Topic