0

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.

HBruijn
  • 77,029
  • 24
  • 135
  • 201
Alexander T
  • 287
  • 1
  • 8

1 Answers1

0

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
MadHatter
  • 79,770
  • 20
  • 184
  • 232
pkhamre
  • 6,120
  • 3
  • 17
  • 27
  • Does this present the data in the right category on the server, or do they still appear to come from the intermediate one? – Alexander T Mar 28 '12 at 11:29
  • To put it another way: Is there any way of getting munin to present the data as coming from the origin server? – Alexander T Mar 28 '12 at 11:30
  • They will appear under the same host, but you can change `env.category` to split them. – pkhamre Mar 28 '12 at 11:31
  • I don't think you can achieve that withour running multiple munin-nodes. Another alternative is to create a cronjob that fetches the graphs and presents them in another per host html-view. – pkhamre Mar 28 '12 at 11:32
  • Good idea with the categories. That gets me back in business. Please let me know if you figure out a way of splitting into multiple hosts without the manual cronjob. Cheers – Alexander T Mar 28 '12 at 12:45