MOON
Server: Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4
System: Linux csr818.wilogic.com 2.6.18-419.el5xen #1 SMP Fri Feb 24 22:50:37 UTC 2017 x86_64
User: digitals (531)
PHP: 5.4.45
Disabled: NONE
Upload Files
File: //usr/local/ssl/share/munin/plugins/netopia
#!/bin/sh
# -*- 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;

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/^.*: //'