Munin + Raspberry Pi + GlusterFS
Posted: Fri Mar 28, 2014 8:21 pm
I've just setup Munin monitoring on our Raspberry Pi. Since I'm also using GlusterFS, which will grow in size over time, it might be a good idea to graph the absolute disk usage, rather than just the percentage (which is the default).
First thing I noticed was, that the disk usage of the mounted glusterfs volume didn't even show up in Munin's df graph.
The documentation in the df-plugin's perl code mentions options to include/exclude certain mountpoints. I tried that, but it didn't help.
Only local filesystems supported:
The reason is that the current 'df' plugin (Munin v2.0.6) only support local filesystems.
Patch for supporting network filesystems:
So I debugged the df perl code, and finally wrote a patch to support non-local filesystems, too. It's even more generic: It enables you to manually configure to commandline options passed to the "df" call.
Since I don't see this patch interfering with df's former usage, I committed the patch as Ticket #1461 on Munin's tracker.
Configure 'df' plugin options:
Edit your "/etc/munin/plugin-conf.d/munin-node" config file, and add the following setting to your [df*] block:
By overriding it with only "-P" (=POSIX compliant output), it now supports graphing glusterfs shares, too.
After you've finished, editing the configfile, restart the munin-node service:
That's it. Your GlusterFS mountpoint should now show up on the "Disk Usage" graph
Links:
First thing I noticed was, that the disk usage of the mounted glusterfs volume didn't even show up in Munin's df graph.
The documentation in the df-plugin's perl code mentions options to include/exclude certain mountpoints. I tried that, but it didn't help.
Only local filesystems supported:
The reason is that the current 'df' plugin (Munin v2.0.6) only support local filesystems.
Patch for supporting network filesystems:
So I debugged the df perl code, and finally wrote a patch to support non-local filesystems, too. It's even more generic: It enables you to manually configure to commandline options passed to the "df" call.
Since I don't see this patch interfering with df's former usage, I committed the patch as Ticket #1461 on Munin's tracker.
Configure 'df' plugin options:
Edit your "/etc/munin/plugin-conf.d/munin-node" config file, and add the following setting to your [df*] block:
It looks a bit odd (due to missing quotation marks), but it works perfectly. The default options supplied to "df" by the plugin are "-P -l", which limits the available filesystems to local-only.env.dfopts -P
By overriding it with only "-P" (=POSIX compliant output), it now supports graphing glusterfs shares, too.
After you've finished, editing the configfile, restart the munin-node service:
Code: Select all
$ sudo service munin-node restart
Links: