munin-monitoring / contrib

Contributed stuff for munin (plugins, tools, etc...)
http://munin-monitoring.org
1.05k stars 684 forks source link

contrib/plugins/disk/du-2 does not work first time until du.cache file is created manually #914

Open Talkless opened 6 years ago

Talkless commented 6 years ago

It seems that I have to create /var/lib/munin-node/plugin-state/root/du.cache file manually, or else plugin does not return anything.

strace show that it fails to open that file and exits:

open("/var/lib/munin-node/plugin-state/root/du.cache", O_RDONLY) = -1 ENOENT (No such file or directory)
rt_sigaction(SIGHUP, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [], 0}, 8) = 0
...
exit_group(1)                           = ?
+++ exited with 1 +++

I'm guessing it's because of https://github.com/munin-monitoring/contrib/blob/3f253ebec9a3558e41c84ba3c54221d2ad24d6ca/plugins/disk/du-2#L90 and/or https://github.com/munin-monitoring/contrib/blob/3f253ebec9a3558e41c84ba3c54221d2ad24d6ca/plugins/disk/du-2#L109 statements.

Talkless commented 6 years ago

Seems that it has another problems, like "No .label provided": munin-du-2

For this config:

[du]
user root
env.dirs /var/lib/postgresql/10/main/pg_wal/ /var/lib/postgresql/9.6/main/pg_xlog/ /var/lib/postgresql/9.6/secondary/pg_xlog/ 
env.interval 5
timeout 300

Any ides how to quick-fix it?

It's munin-node 2.0.33-1~bpo8+1 on Debian 8 (jessie).

Talkless commented 6 years ago

I've provided fix for that "No .label provied": https://github.com/munin-monitoring/contrib/pull/915

sumpfralle commented 6 years ago

Thank you for fixing the first half!

The second half looks reasonable, too:

It is a bit mysterious, that all previous users of that plugin seem to have "solved" the problem manually without talking about it :(

github-actions[bot] commented 3 years ago

Stale issue message