I'm just trying to setup monitoring using "Munin" on a Raspberry Pi.
The installation was super easy, and graphs are updated every 5 minutes out of the box.
Unfortunately, some graphs were only generated when munin-node was started, but don't get updated.
In my case, the plugins which seem to have problems are:
- diskstats
- munin_stats
Following the "Plugin Debugging" article in the Munin docs, I tried executing the "diskstats" plugin manually (as root):
Code: Select all
$ sudo munin-run diskstats
It's weird that it mentions user "nobody" and no IP at the end of "diskstats-", but:diskstats: Could not open statefile '/var/lib/munin-node/plugin-state/nobody/diskstats-' for writing: No such file or directory
It's telling the truth: "/var/lib/munin-node" exists, but is completely empty and belongs to "root:root" (see Debian Bug #679897).
[MID-SOLUTION]
I've changed ownership to "munin:munin" and created the "plugin-state" subfolder:
Code: Select all
$ sudo mkdir -p /var/lib/munin-node/plugin-state
$ sudo chown -R munin:munin /var/lib/munin-node
Still, no graphs for diskstats
So I tried connecting to munin-node directly and fetch diskstats:
Code: Select all
$ echo fetch diskstats | nc localhost 4949
So I checked the "/var/log/munin-node.log" (again).Bad exit
Now I get:
[SOLUTION]2014/03/26-22:52:28 [31601] Error output from diskstats:
2014/03/26-22:52:28 [31601] diskstats: Could not open statefile '/var/lib/munin-node/plugin-state/nobody/diskstats-127.0.0.1' for writing: Permission denied
2014/03/26-22:52:28 [31601] Service 'diskstats' exited with status 13/0.
Okay. I've now copied the "diskstats-" file in "/var/lib/munin-node/plugin-state/nobody" to both IPs of my server:
- /var/lib/munin-node/plugin-state/nobody/diskstats-127.0.0.1
- /var/lib/munin-node/plugin-state/nobody/diskstats-192.168.1.x
Now, running the "fetch diskstats" per "nc" again, returns values! YAY!
The timestamp in the diskstats graphs is now updated like the others
Victory is mine!
It currently works, but I'm not 100% sure which of the "nobody/diskstats-*" files are now actually used/valid. Furthermore, I'd like to figure out the correct chown/chmod settings for it.
Links: