2

my company recently moved to a new infrastructure provider. We got a partially managed server there with a basic installation of Ubuntu 14.04. The provider also has munin-node (munin version 2.0.19) installed on the machine with some custom plugins for their monitoring.

Now, we would like to use our own monitoring which we had in place before changing providers, also. We have a munin-master up and running. Our monitoring includes a few more plugins which we developed ourselves to monitor our applications. So, while I don't want their plugins, they don't need ours. Some of our plugins also employ reset-on-read counters.
This means simply allowing our munin-master on the munin-node and additionally read the stats from there is no solution.

What I actually need is a second munin-node daemon running on the machine. I could do this by simply copying the init.d startup scripts, changing ports etc, creating another plugins dir and put our additional plugins there.

However, I can't find a way to change the plugin dir munin uses. I can set another config file to read, but there seems to be no option to specify plugin location. There is also no command line option for munin-node (though, other scripts like munin-run and munin-node-configure seem to have them). I tried googling, I've been in the source code, but I can't find any way to achieve this.

1

This is the best I came up with, which might not be the best solution, but it works:

  • copy /etc/munin to /etc/munin2
  • modify settings in munin-node.conf
    • log_file: change to .../munin-node2.log
    • pid_file: change to .../munin-node2.pid
    • port: change to 4948 (or whatever suits you best)
  • add/remove plugins in plugins/ as needed
  • modify settings in plugin-conf.d/ and munin-node.conf as needed
  • copy /usr/sbin/munin-node to /usr/sbin/munin-node2
  • in munin-node2, insert $Munin::Common::Defaults::MUNIN_CONFDIR='/etc/munin2'; after the last use ...;
  • copy /etc/init/munin-node.conf to /etc/init/munin-node2.conf
  • in munin-node2.conf, modify
    • [ -r /etc/default/munin-node ] && . /etc/default/munin-node to [ -r /etc/default/munin-node2 ] && . /etc/default/munin-node2
    • exec /usr/sbin/munin-node $DAEMON_ARGS to exec /usr/sbin/munin-node2 $DAEMON_ARGS

Now, you should be able to start the second munin node by service munin-node2 start, and ps ax|grep munin-node should show it running alongside the primary one.

All that is now needed is to mention the other port for that particular munin-node inside your munin.conf or munin-conf.d/ on your munin-master.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.