I'm using this shell script to graph traffic from a specific PPPoE session over a cisco router:
Code: Select all
#!/bin/sh
#
# Find a user's in/out traffic by username.
# Syntax:
# pppoetraffic.sh <router ip> <snmp community> <snmp version> <username>
ROUTER=$1
ROCOMMUNITY=$2
SNMPVERSION=$3c
USERNAME=$4
SNMPWALK="/usr/bin/snmpwalk"
SNMPGET="/usr/bin/snmpget"
USERID=`$SNMPWALK -On -v $SNMPVERSION -c $ROCOMMUNITY $ROUTER 1.3.6.1.4.1.9.9.150.1.1.3.1.2 | grep "\"$USERNAME\"" | cut -f1 -d'=' | sed 's/.1.3.6.1.4.1.9.9.150.1.1.3.1.2.//'`
if [ "$USERID" != "" ]
then
IFNUM=`$SNMPGET -Oqv -v $SNMPVERSION -c $ROCOMMUNITY $ROUTER 1.3.6.1.4.1.9.9.150.1.1.3.1.8.$USERID`
else
IFNUM=0
fi
if [ "$IFNUM" = "0" ]
then
INOCTETS=0
OUTOCTETS=0
else
INOCTETS=`$SNMPGET -Oqv -v $SNMPVERSION -c $ROCOMMUNITY $ROUTER IF-MIB::ifInOctets.$IFNUM`
OUTOCTETS=`$SNMPGET -Oqv -v $SNMPVERSION -c $ROCOMMUNITY $ROUTER IF-MIB::ifOutOctets.$IFNUM`
fi
echo "in_traffic:$INOCTETS out_traffic:$OUTOCTETS"
Il older version ( I was using 0.8.8h) i was able to create a new data source and and then create the graph from the graph management page and selecting the data source.
In the new version (Im on 1.2.3) i still can create the data source manually, but i cant create the graph cause i dont see my graph template.
How can i graph these data source now?
Thanks for the help