mirror of
https://github.com/munin-monitoring/muninlite.git
synced 2024-12-22 13:52:13 +01:00
84fd994485
git-svn-id: svn://svn.code.sf.net/p/muninlite/code/muninlite@15 35caa317-6b62-4e8a-81c0-b04f0c356266
24 lines
759 B
Text
24 lines
759 B
Text
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."
|
|
for PART in $(df | sed '/\/[a-z0-9]*$/!d;s/.* \([a-z0-9\/]\{1,\}\)$/\1/g')
|
|
do
|
|
PINFO=$(df $PART | tail -1);
|
|
PNAME=$(echo $PINFO | cut -d\ -f1 | sed 's/\//_/g')
|
|
echo "$PNAME.label $PART"
|
|
echo "$PNAME.info $PNAME -> $PART"
|
|
echo "$PNAME.warning 92"
|
|
echo "$PNAME.critical 98"
|
|
done
|
|
}
|
|
fetch_df() {
|
|
for PART in $(df | sed '/\/[a-z0-9]*$/!d;s/.* \([a-z0-9\/]\{1,\}\)$/\1/g')
|
|
do
|
|
PINFO=$(df $PART | tail -1);
|
|
PNAME=$(echo $PINFO | cut -d\ -f1 | sed 's/\//_/g')
|
|
echo "$PNAME.value" $(echo $PINFO | cut -f5 -d\ | sed -e 's/\%//g')
|
|
done
|
|
}
|