Discussion:
get passtest example working
(too old to reply)
Jeff Sadowski
2015-03-18 19:12:02 UTC
Permalink
I am looking at the passtest example in the default config file and
wanted to get that working
I found the passtest file in /usr/share/doc/net-snmp/passtest
I copied it to /scripts/passtest.sh

I noticed PLACE=".1.3.6.1.4.1.8072.2.255"
in the file
I edited /etc/snmp/snmpd.conf and added the line

pass .1.3.6.1.4.1.8072.2.255 /bin/sh /scripts/passtest.sh

like the example but with the .1.3.6.1.4.1.8072.2.255 in place of
.1.3.6.1.4.1.2021.255
I restarted snmpd
then I ran

snmpwalk -v 1 localhost -c public .1.3.6.1.4.1.8072.2.255

I got

End of MIB

I expected something similar to

# enterprises.ucdavis.255.1 = "life the universe and everything"
# enterprises.ucdavis.255.2.1 = 42
# enterprises.ucdavis.255.2.2 = OID: 42.42.42
# enterprises.ucdavis.255.3 = Timeticks: (363136200) 42 days, 0:42:42
# enterprises.ucdavis.255.4 = IpAddress: 127.0.0.1
# enterprises.ucdavis.255.5 = 42
# enterprises.ucdavis.255.6 = Gauge: 42

What am I doing wrong?
Jeff Sadowski
2015-03-18 21:53:47 UTC
Permalink
It was all the default stuff in the config file
My config file now looks like

rocommunity public
pass .1.3.6.1.4.1.8072.2.255 /bin/sh /scripts/passtest.sh

that was all I had to do
Post by Jeff Sadowski
I am looking at the passtest example in the default config file and
wanted to get that working
I found the passtest file in /usr/share/doc/net-snmp/passtest
I copied it to /scripts/passtest.sh
I noticed PLACE=".1.3.6.1.4.1.8072.2.255"
in the file
I edited /etc/snmp/snmpd.conf and added the line
pass .1.3.6.1.4.1.8072.2.255 /bin/sh /scripts/passtest.sh
like the example but with the .1.3.6.1.4.1.8072.2.255 in place of
.1.3.6.1.4.1.2021.255
I restarted snmpd
then I ran
snmpwalk -v 1 localhost -c public .1.3.6.1.4.1.8072.2.255
I got
End of MIB
I expected something similar to
# enterprises.ucdavis.255.1 = "life the universe and everything"
# enterprises.ucdavis.255.2.1 = 42
# enterprises.ucdavis.255.2.2 = OID: 42.42.42
# enterprises.ucdavis.255.3 = Timeticks: (363136200) 42 days, 0:42:42
# enterprises.ucdavis.255.4 = IpAddress: 127.0.0.1
# enterprises.ucdavis.255.5 = 42
# enterprises.ucdavis.255.6 = Gauge: 42
What am I doing wrong?
Loading...