2007-06-11 17:45:16 +02:00
|
|
|
config_df() {
|
|
|
|
echo "graph_title Filesystem usage (in %)
|
|
|
|
graph_args --upper-limit 100 -l 0
|
|
|
|
graph_vlabel %
|
|
|
|
graph_category disk
|
|
|
|
graph_info This graph shows disk usage on the machine."
|
2023-12-13 00:59:12 +01:00
|
|
|
df -PT | grep '^/' | grep -vwE "$DF_IGNORE_FILESYSTEM_REGEX" | while read dev type blocks used avail pct mp
|
2007-06-11 17:45:16 +02:00
|
|
|
do
|
2023-12-13 00:59:12 +01:00
|
|
|
PNAME=$(clean_fieldname "$dev")
|
|
|
|
echo "$PNAME.label $mp"
|
|
|
|
echo "$PNAME.info $dev -> $mp"
|
2007-06-11 17:45:16 +02:00
|
|
|
echo "$PNAME.warning 92"
|
|
|
|
echo "$PNAME.critical 98"
|
|
|
|
done
|
|
|
|
}
|
|
|
|
fetch_df() {
|
2023-12-13 00:59:12 +01:00
|
|
|
df -PT | grep '^/' | grep -vwE "$DF_IGNORE_FILESYSTEM_REGEX" | while read dev type blocks used avail pct mp
|
2007-06-11 17:45:16 +02:00
|
|
|
do
|
2023-12-13 00:59:12 +01:00
|
|
|
PNAME=$(clean_fieldname "$dev")
|
|
|
|
echo "$PNAME.value" "${pct%\%}"
|
2007-06-11 17:45:16 +02:00
|
|
|
done
|
|
|
|
}
|