muninlite/plugins/if_err_
runesk 7c8bd1e394 Import
git-svn-id: svn://svn.code.sf.net/p/muninlite/code/muninlite@1 35caa317-6b62-4e8a-81c0-b04f0c356266
2007-06-11 15:45:16 +00:00

22 lines
706 B
Plaintext

config_if_err() {
echo "graph_order rcvd trans"
echo "graph_title $1 errors"
echo "graph_args --base 1000"
echo "graph_vlabel packets in (-) / out (+) per \${graph_period}"
echo "graph_category network"
echo "graph_info This graph shows the amount of errors on the $1 network interface."
echo "rcvd.label packets"
echo "rcvd.type COUNTER"
echo "rcvd.graph no"
echo "rcvd.warning 1"
echo "trans.label packets"
echo "trans.type COUNTER"
echo "trans.negative rcvd"
echo "trans.warning 1"
}
fetch_if_err() {
IINFO=$(grep "$1:" /proc/net/dev | cut -d: -f2 | sed -e 's/ / /g')
echo "rcvd.value" $(echo $IINFO | cut -d\ -f3)
echo "trans.value" $(echo $IINFO | cut -d\ -f11)
}