1

Iwant to add an custom OID to MIB tree structure. I add the line as below to file /etc/snmp/snmpd.conf

extend    test1   /bin/echo  Hello, world!

but I don't know how to specifiy the exact OID number. Is there any way to do that?

0

Sure, for example when I want to graph more fancy disk usage with say, iostat I have

pass .1.3.6.1.3.1 /usr/bin/perl /usr/local/bin/iostat.pl

at the bottom of my /etc/snmp/snmpd.conf

then I can use snmpwalk -v2c -cpublic localhost snmpwalk -v2c -cpublic localhost .1.3.6.1.3.1

  • I did as your answer, but when I restart snmpd service, I received the error: /etc/snmp/snmpd.conf: line 154: Error: unknown monitor OID – Waveter Apr 21 '16 at 9:23
  • Well what's the full line now? You may need to use the experimental tree like above rather than something that's probably allocated to an enterprise but I'm not sure. – Recct Apr 21 '16 at 9:53
  • Here is my line: pass .1.3.6.1.3.1 /bin/sh /etc/snmp/scripts/postgresfiles.sh, and the error become /etc/snmp/snmpd.conf: line 154: Error: unknown payload OID – Waveter Apr 21 '16 at 10:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.