SNMP custom script :: OID not increasing
Posted
by
amprantino
on Server Fault
See other posts from Server Fault
or by amprantino
Published on 2012-09-16T01:50:14Z
Indexed on
2012/09/16
3:40 UTC
Read the original article
Hit count: 666
I try to create a custom SNMP oid.
I add the following like to snmpd.conf (and restart service) : pass .1.3.6.1.3.2 /bin/myscript.sh
cat myscript.sh
#!/bin/sh
echo .1.3.6.1.3.2
echo gauge
exec 100
snmpwalk -c mycommunity -v2c 10.2.1.4 .1.3.6.1.3.2
SNMPv2-SMI::experimental.2 = Gauge32: 100
Error: OID not increasing: SNMPv2-SMI::experimental.2
>= SNMPv2-SMI::experimental.2
Is snmpwalk expecting anything at the end of the query ? snmpget work with no problem!
Thank you
© Server Fault or respective owner