mirror of
https://github.com/munin-monitoring/muninlite.git
synced 2024-12-22 13:52:13 +01:00
Plugin df: ignore read-only and virtual filesystem types
The set of filesystems is based on the list of excluded filesystems in munin's "df" plugin for Linux.
This commit is contained in:
parent
44d1c8dc3a
commit
e3103bdb6e
1 changed files with 2 additions and 1 deletions
|
@ -1,10 +1,11 @@
|
||||||
config_df() {
|
config_df() {
|
||||||
|
IGNORE_FILESYSTEM_REGEX="(none|unknown|rootfs|iso9660|squashfs|udf|romfs|ramfs|debugfs|cgroup_root|devtmpfs)"
|
||||||
echo "graph_title Filesystem usage (in %)
|
echo "graph_title Filesystem usage (in %)
|
||||||
graph_args --upper-limit 100 -l 0
|
graph_args --upper-limit 100 -l 0
|
||||||
graph_vlabel %
|
graph_vlabel %
|
||||||
graph_category disk
|
graph_category disk
|
||||||
graph_info This graph shows disk usage on the machine."
|
graph_info This graph shows disk usage on the machine."
|
||||||
for PART in $(df -P | grep '^/' | sed '/\/[a-z0-9]*$/!d;s/.* \([a-z0-9\/]\{1,\}\)$/\1/g')
|
for PART in $(df -PT | grep '^/' | grep -vwE "$IGNORE_FILESYSTEM_REGEX" | sed '/\/[a-z0-9]*$/!d;s/.* \([a-z0-9\/]\{1,\}\)$/\1/g')
|
||||||
do
|
do
|
||||||
PINFO=$(df -P "$PART" | tail -1);
|
PINFO=$(df -P "$PART" | tail -1);
|
||||||
PNAME=$(echo "$PINFO" | cut -d " " -f 1 | sed 's/\//_/g')
|
PNAME=$(echo "$PINFO" | cut -d " " -f 1 | sed 's/\//_/g')
|
||||||
|
|
Loading…
Reference in a new issue