/usr/share/munin/plugins/df_abs is in munin-node 1.4.6-3ubuntu3.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | #!/bin/bash
# -*- sh -*-
: <<EOF
=head1 NAME
df_abs - Plugin to monitor absolute disk usage
=head1 CONFIGURATION
The following configuration parameters are used by this plugin
[df_abs]
env.exclude - space separated list of file system types to exclude
env.warning - Warning percentage
env.critical - Critical percentage
env.total - Enable/Disable graph total [on|off]
=head2 DEFAULT CONFIGURATION
[df_abs]
env.exclude iso9660
env.warning 92
env.critical 98
env.total on
=head1 AUTHORS
Unknown author
=head1 LICENSE
Unknown license
=head1 BUGS
Does not handle cases where the block special device is the same for
multiple mounts. On Ubuntu systems, this is commonly "none" for
non-disk file systems like fusectl, debugfs, securityfs, devpts,
tmpfs, etc...
=head1 MAGIC MARKERS
#%# family=manual
#%# capabilities=autoconf
=cut
EOF
. $MUNIN_LIBDIR/plugins/plugin.sh
if [ "$1" = "autoconf" ]; then
echo yes
exit 0
fi
total=${total:-on}
exclude=${exclude:-iso9660}
exclude=$(echo $exclude | sed -r -e 's/ +/ -x /g' -e 's/^/-x /')
if [ "$1" = "config" ]; then
echo 'graph_title Filesystem usage (in bytes)'
echo 'graph_args --base 1024 --lower-limit 0'
echo 'graph_vlabel bytes'
echo 'graph_category disk'
if [ "$total" = "on" ]; then
echo 'graph_total Total'
fi
df -P -l $exclude | sed 1d | grep -v "//" |
while read dev size used avail cap mnt; do
name="$(clean_fieldname $dev)"
echo "$name.label $mnt"
echo "$name.cdef $name,1024,*"
warn=$(get_warning $name)
crit=$(get_critical $name)
if [ -n "$warn" ]; then
echo "$name.warning $((size * $warn / 100))"
fi
if [ -n "$crit" ]; then
echo "$name.critical $((size * $crit / 100))"
fi
done
exit 0
fi
df -P -l $exclude | sed 1d | grep -v "//" |
while read dev size used avail cap mnt; do
echo "$(clean_fieldname $dev).value $used"
done
|