2

I've been given the task of taking various status bits from an embedded RF device and asked to turn them into SNMP Traps. I have the SNMP library but I lack the knowledge on where to get or create the OIDs. Here's an snmptrap as a point of reference:

  snmptrap -v 2c -c public 192.168.1.1:162 \
    .1.3.6.1.6.3.1.1.5.3 .1.3.6.1.6.3.1.1.5.3 \
    ifIndex i 2 ifAdminStatus i 1 ifOperStatus i 1

Normally I'm on the receiving end of these traps and rely on the manufacturer-provided MIBs. So I'd get .1.3.6.1.6.3.1.1.5.3 from the MIB file and add the necessary parameters to send. Now, I think I'm the guy creating the MIBs. How do I go about doing this?

Thanks

1

I'd start by following the instructions from Net SNMP:

http://net-snmp.sourceforge.net/wiki/index.php/Writing_your_own_MIBs

| improve this answer | |
  • Wow, the answer is spot on and afraid to say that I should have tried to look for something as simple as this. :-) – Neil Cherry Sep 20 '18 at 15:47
  • Yes that page is well-written, short, and has very good links to what you need to get going. Glad to have helped point you at it. – jonathanjo Sep 21 '18 at 10:54
  • We're using an RTU to supply the SNMP interface, so tjis project has been put aside. But one of the recommendations was to purchase the book: Understanding SNMP MIBS by David Perkins and Even McGinnis. I'm using this book and the RTU's MIB to understand how MIBs relate to the device. So far I've learned quite a bit. Still have a ways to go yet. Thanks – Neil Cherry Dec 28 '18 at 14:56

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.