File: netopia.in

package info (click to toggle)
munin 2.0.76-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,064 kB
  • sloc: perl: 11,684; java: 1,924; sh: 1,632; makefile: 636; javascript: 365; python: 267
file content (32 lines) | stat: -rw-r--r-- 814 bytes parent folder | download | duplicates (4)
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
32
#!@@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'
	# shellcheck disable=SC2016
	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/^.*: //'