File: netopia.in

package info (click to toggle)
munin 1.2.3-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,940 kB
  • ctags: 98
  • sloc: sh: 4,215; makefile: 452; perl: 135
file content (50 lines) | stat: -rwxr-xr-x 1,452 bytes parent folder | download | duplicates (3)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh

# $Log$
# Revision 1.4  2004/12/10 10:47:49  jimmyo
# Change name from ${scale} to ${graph_period}, to be more consistent.
#
# Revision 1.3  2004/12/09 22:12:56  jimmyo
# Added "graph_period" option, to make "graph_sums" usable.
#
# Revision 1.2  2004/11/21 00:17:12  jimmyo
# Changed a lot of plugins so they use DERIVE instead of COUNTER.
#
# Revision 1.1  2004/01/02 18:50:01  jimmyo
# Renamed occurrances of lrrd -> munin
#
# Revision 1.1.1.1  2004/01/02 15:18:07  jimmyo
# Import of LRRD CVS tree after renaming to Munin
#
# Revision 1.4  2003/11/07 22:12:50  jimmyo
# Changed deprecated plugin options
#
# Revision 1.3  2003/11/07 17:43:16  jimmyo
# Cleanups and log entries
#

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;

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