3
# Wildcard-plugin to monitor network interfaces. To monitor an
4
# interface, link if_err_<interface> to this file. E.g.
6
# ln -s /usr/share/munin/node/plugins-auto/if_err_ /etc/munin/node.d/if_err_eth0
8
# ...will monitor eth0.
10
# Any devince found in /proc/net/dev can be monitored. Examples include
11
# ipsec*, eth*, irda* and lo. Please note that vlans and aliases cannot
12
# be monitored with this plugin.
14
# $Log: if_err_.in,v $
15
# Revision 1.1 2004/01/02 18:50:01 jimmyo
16
# Renamed occurrances of lrrd -> munin
18
# Revision 1.1.1.1 2004/01/02 15:18:07 jimmyo
19
# Import of LRRD CVS tree after renaming to Munin
21
# Revision 1.3 2003/11/07 22:12:50 jimmyo
22
# Changed deprecated plugin options
24
# Revision 1.2 2003/11/07 17:43:16 jimmyo
25
# Cleanups and log entries
29
# Magic markers (optional - used by munin-config and some installation
33
#%# capabilities=autoconf suggest
36
INTERFACE=`basename $0 | sed 's/^if_err_//g'`
38
if [ "$1" = "autoconf" ]; then
39
if [ -r /proc/net/dev ]; then
43
echo "no (/proc/net/dev not found)"
48
if [ "$1" = "suggest" ]; then
49
if [ -r /proc/net/dev ]; then
50
grep eth /proc/net/dev | cut -f1 -d: | sed 's/ //g'
57
if [ "$1" = "config" ]; then
58
echo "host_name $HOSTNAME"
59
echo "graph_order rcvd trans"
60
echo "graph_title $INTERFACE errors"
61
echo 'graph_args --base 1000'
62
echo 'graph_vlabel packets in (-) / out (+)'
63
echo 'rcvd.label packets per min'
64
echo 'rcvd.type COUNTER'
66
echo 'rcvd.cdef rcvd,8,*'
68
echo 'trans.label packets per min'
69
echo 'trans.type COUNTER'
70
echo 'trans.negative rcvd'
71
echo 'trans.cdef trans,8,*'
72
echo 'trans.warning 1'
76
grep $INTERFACE /proc/net/dev | cut -f2 -d: | awk "{ print \"rcvd.value \" \$3 \"\ntrans.value \" \$11}"