I have this Wi-Fi AP that is a Linux box.
It has SNMP service working and I've been successful generating graphs using "Generic SNMP - Enabled Host".
But now I would like to have some graphs for specific SNMP values that this device has.
I found this file in the AP's Linux box, /bin/snmp.sh :
Notice there are some OID's I would like to have graphs from. Like ACTIVE_CLIENTS for example, that are the devices connected as Client to the AP.FLASH_TOOLS=flash
eval `$FLASH_TOOLS get SNMP_ENABLED`
PIDFILE=/var/run/snmpd.pid
if [ "$SNMP_ENABLED" = 0 ] && [ -f $PIDFILE ] ; then
PID=`cat $PIDFILE`
if [ $PID != 0 ]; then
kill -9 $PID
fi
rm -f $PIDFILE
fi
if [ "$SNMP_ENABLED" != 0 ]; then
CONF_FILE=/usr/local/etc/snmp/snmpd.conf
rm -f $CONF_FILE
eval `$FLASH_TOOLS get IP_ADDR`
IP1=`echo $IP_ADDR | cut -f1 -d.`
IP2=`echo $IP_ADDR | cut -f2 -d.`
IP3=`echo $IP_ADDR | cut -f3 -d.`
eval `$FLASH_TOOLS get SNMP_COMM`
eval `$FLASH_TOOLS get SNMP_LOCATION`
eval `$FLASH_TOOLS get SNMP_CONTACT`
eval `$FLASH_TOOLS get PROD_ID`
eval `$FLASH_TOOLS get SNMP_TRAP1`
eval `$FLASH_TOOLS get SNMP_COMM1`
eval `$FLASH_TOOLS get SNMP_TRAP2`
eval `$FLASH_TOOLS get SNMP_COMM2`
eval `$FLASH_TOOLS get SNMP_TRAP3`
eval `$FLASH_TOOLS get SNMP_COMM3`
echo "com2sec mynetwork default $SNMP_COMM" > $CONF_FILE
echo "group MyROGroup v1 mynetwork" >> $CONF_FILE
echo "group MyROGroup v2c mynetwork" >> $CONF_FILE
echo "group MyROGroup usm mynetwork" >> $CONF_FILE
echo "access MyROGroup \"\" any noauth prefix all none none" >> $CONF_FILE
echo "access MyRWGroup \"\" any noauth prefix all all all" >> $CONF_FILE
echo "view all included .1 80" >> $CONF_FILE
echo "syslocation $SNMP_LOCATION" >> $CONF_FILE
echo "syscontact $SNMP_CONTACT" >> $CONF_FILE
echo "sysname $PROD_ID" >> $CONF_FILE
echo "exec .1.3.6.1.4.1.99.1 MODE /bin/flash snmpget MODE" >> $CONF_FILE
echo "exec .1.3.6.1.4.1.99.2 SSID /bin/flash snmpget SSID" >> $CONF_FILE
echo "exec .1.3.6.1.4.1.99.3 CHANNEL /bin/flash snmpget CHANNEL" >> $CONF_FILE
echo "exec .1.3.6.1.4.1.99.4 BAND /bin/flash snmpget BAND" >> $CONF_FILE
echo "exec .1.3.6.1.4.1.99.5 RSSI /bin/flash snmpget RSSI" >> $CONF_FILE
echo "exec .1.3.6.1.4.1.99.6 ACTIVE_CLIENTS /bin/flash snmpget ACTIVE_CLIENTS" >> $CONF_FILE
echo "exec .1.3.6.1.4.1.99.7 ENCRYPTION /bin/flash snmpget ENCRYPTION " >> $CONF_FILE
if [ "$SNMP_TRAP1" != '0.0.0.0' ]; then
echo "trapsink $SNMP_TRAP1 $SNMP_COMM1" >> $CONF_FILE
fi
if [ "$SNMP_TRAP2" != '0.0.0.0' ]; then
echo "trapsink $SNMP_TRAP2 $SNMP_COMM2" >> $CONF_FILE
fi
if [ "$SNMP_TRAP3" != '0.0.0.0' ]; then
echo "trapsink $SNMP_TRAP3 $SNMP_COMM3" >> $CONF_FILE
fi
if [ "$SNMP_TRAP1" != '0.0.0.0' ] || [ "$SNMP_TRAP2" != '0.0.0.0' ] || [ "$SNMP_TRAP3" != '0.0.0.0' ]; then
echo "agentSecName internal" >> $CONF_FILE
echo "rouser internal" >> $CONF_FILE
echo "linkUpDownNotifications yes" >> $CONF_FILE
fi
if [ -f $PIDFILE ] ; then
PID=`cat $PIDFILE`
if [ $PID != 0 ]; then
## just restart it
kill -HUP $PID
fi
else
/usr/local/bin/snmpd -p $PIDFILE &
fi
fi
I don´t know what to do with this OID's
I've been trying to use them on "SNMP - Generic OID Template" without success. All I get is a blank graph. Maybe I'm doing something wrong, I don't know.
All I know is that if I snmpget that OID it returns the correct value.
So please, someone give me a hand on this!
Thanks