mirror of
https://github.com/munin-monitoring/muninlite.git
synced 2024-11-18 09:30:42 +01:00
22 lines
1 KiB
Text
22 lines
1 KiB
Text
|
config_if() {
|
||
|
echo "graph_order down up"
|
||
|
echo "graph_title $1 traffic"
|
||
|
echo "graph_args --base 1000"
|
||
|
echo "graph_vlabel bits in (-) / out (+) per \${graph_period}"
|
||
|
echo "graph_category network"
|
||
|
echo "graph_info This graph shows the traffic of the $INTERFACE network interface. Please note that the traffic is shown in bits per second, not bytes. IMPORTANT: Since the data source for this plugin use 32bit counters, this plugin is really unreliable and unsuitable for most 100Mb (or faster) interfaces, where bursts are expected to exceed 50Mbps. This means that this plugin is usuitable for most production environments. To avoid this problem, use the ip_ plugin instead."
|
||
|
echo "down.label received"
|
||
|
echo "down.type COUNTER"
|
||
|
echo "down.graph no"
|
||
|
echo "down.cdef down,8,*"
|
||
|
echo "up.label bps"
|
||
|
echo "up.type COUNTER"
|
||
|
echo "up.negative down"
|
||
|
echo "up.cdef up,8,*"
|
||
|
}
|
||
|
fetch_if() {
|
||
|
IINFO=$(grep "$1:" /proc/net/dev | cut -d: -f2 | sed -e 's/ / /g')
|
||
|
echo "down.value" $(echo $IINFO | cut -d\ -f1)
|
||
|
echo "up.value" $(echo $IINFO | cut -d\ -f9)
|
||
|
}
|