mirror of
https://github.com/munin-monitoring/muninlite.git
synced 2024-11-18 09:30:42 +01:00
7b4f376daf
munin-node passes the original interface name (as extracted from /proc/net/dev) to if_* and if_err_*. Thus replacing dash with underscore results in interfaces not being found anymore. Source: patch "220-modify-ifname-parser" from OpenWrt Author: Martin Blumenstingl
21 lines
724 B
Text
21 lines
724 B
Text
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' -e 's/^[ \t]*//')
|
|
echo "rcvd.value" $(echo $IINFO | cut -d\ -f3)
|
|
echo "trans.value" $(echo $IINFO | cut -d\ -f11)
|
|
}
|