Tyler
Tyler

Reputation: 955

SNMP pass-through command not returning with snmpget

I am trying to get some scripts working in my snmpd.conf file using pass, however calling snmpget on the OID is returning

No Such Instance currently exists at this OID

in the snmpd.conf I have

pass .1.3.6.1.4.1.13732.100.2.1  /bin/sh       /usr/share/snmp/local/terminal

and when I call

snmpget -c public -v2c 127.0.0.1 .1.3.6.1.4.1.13732.100.2.1.1

I get the no such instance error. Why does the snmpget not seem to find the pass in the conf file and use the script?

It is able to find the OID in the MIB because the snmpget returns the MIB plus the object name with the error

Please let me know if any more info is needed to help answer this question

Upvotes: 2

Views: 6827

Answers (1)

rabhis
rabhis

Reputation: 440

You can debug snmpd by starting it foreground as snmpd -f -Lo -Ducd-snmp/pass.

Add the below lines to /etc/snmpd.conf

rocommunity testCommunityString localhost
pass .1.3.6.1.4.1.13732.100.2.1  /bin/sh /home/user/smpd_pass/test.sh

Download sample pass script and change PLACE asPLACE=".1.3.6.1.4.1.13732.100.2.1" to create test.sh pass script.

Now running snmpwalk -c testCommunityString -v2c 127.0.0.1 .1.3.6.1.4.1.13732.100.2.1 would show the values defined in the file.

Upvotes: 4

Related Questions