Avoid remote file systems usage reporting
Brought to you by:
runesk
I'm running muninlite on my Dreambox. I had 2 problems with df plugin:
- the output of df is split to 2 lines for filesystems with long names (e.g. samba shares), example:
//192.168.100.200/videos
940093832 696245876 243847956 74% /media/net/videos
- my 'sed' has problems with the ^A character in the expression
What I ended up with is to remove filesystems that begin with // (I don't need to monitor remote filesystems usage, because they are monitored on the remote machine).
I replaced the ^A character with \1.
Here are my 2 changes:
1. for PART in $(df -P | grep -v '^//' | grep '^/' | sed '/\/[a-z0-9]*$/!d;s/.* \([a-z0-9\/]\{1,\}\)$/\1/g')
2.
Actually the 2nd change is the same as the 1st one, it's a bit down below, in fetch_df()
Now muninlite (in its new home at github) excludes at least virtual and read-only filesystems:
https://github.com/munin-monitoring/muninlite/commit/44628e78cc50094fcbf3765e68ee5b932139e833Remote
Remote filesystems are still being monitored, since it does not really cause harm (and one of muninlite's priorities is simplicity).
Your suggestion regarding the mistreated backreference also found its way into muninlite. Thanks!