File: netopia.in

package info (click to toggle)
munin 2.0.6-4%2Bdeb7u2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 5,944 kB
  • sloc: perl: 11,577; sh: 2,939; java: 1,880; makefile: 726; python: 272
file content (31 lines) | stat: -rw-r--r-- 807 bytes parent folder | download | duplicates (6)
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
#!@@GOODSH@@
# -*- sh -*-


hostname="$(hostname)"

if [ "$1" = "config" ]; then
	echo "host_name $hostname"
	echo "graph_order down up" 
	echo "graph_title ADSL Traffic"
	echo 'graph_args --base 1000'
	echo 'graph_vlabel bits in (-) / out (+) per ${graph_period}'
	echo 'down.label received'
        echo 'down.type DERIVE'
        echo 'down.graph no'
        echo 'down.cdef down,8,*'
	echo "down.max $DOWNMAX"
	echo "down.min 0"
        echo 'up.label bps'
	echo 'up.type DERIVE'
	echo 'up.negative down'
	echo 'up.cdef up,8,*'
	echo "up.max $UPMAX"
	echo "up.min 0"
	exit 0
fi;

printf "down.value "
snmpget -Ov $hostname $COMMUNITY interfaces.ifTable.ifEntry.ifInOctets.3 | sed 's/^.*: //'
printf "up.value "
snmpget -Ov $hostname $COMMUNITY interfaces.ifTable.ifEntry.ifOutOctets.3 | sed 's/^.*: //'