Adding new plugins to munin is pretty straight forward.
If you are struggling to set up your munin instance, there is a neat tutorial at DeviantDev
Now to adding plugins: place your new plugin in /usr/share/munin/plugins/ and make sure all permissions (775) are set. Now create a new link to the “activate plugins” folder:
ln -s /usr/share/munin/plugins/ /etc/munin/plugins/
Before reloading you may need to modify /etc/munin/plugin-conf.d/munin-node to set specific properties for the plugins if required by the plugin. Please read the manual provided with the plugin, usually at the start of the file.
Restart munin and grab a coffee since munin needs some time to include the Plugin.
If your plugin doesn’t show up after around five minutes check the list of activated plugins by using configure:
If it’s displayed as unused check the access rights and your spelling with the link you created before. If it’s displayed as used and it won’t show up double check your plugin configuration. If this doesn’t help have a look at the update logfile /var/log/munin/munin-update.log
If your plugin shows up but don’t get any data (displaying ‘nan’ instead of values) you need to check if your plugin can access the data. Usually it’s due to missing access rights to the data sources or the missing of those sources. There are two different ways to check whats going wrong:
- First way would be to run the plugin manually by using
Usually this either prints the correct results or give you some error messages with incorrect results. If you get no error messages and correct values check the logfile located at /var/log/munin/munin-node.log or try the second way.
- Another way would be to establish a telnet connection to your munin master and try to manually fetch the desired data:
telnet localhost 4949 fetch <plugin>
Like above you’ll either get an error message or, if not, you should have to look at the mentioned logfile.
Sometimes only one of these methods will give you an error message – so if one doesn’t work try the other one. Either one should give you a pretty good Idea where to start looking for.