0
votes

I have written a C-program using net-snmp C package. When I run that program on my laptop, I get the result alright. But when I run the same program on Cloudgate (an openwrt enabled gateway device), I get the following error along with my reuslt

No log handling enabled - turning on stderr logging

Cannot find module (IP-MIB): At line 0 in (none)

Cannot find module (IF-MIB): At line 0 in (none)

Cannot find module (TCP-MIB): At line 0 in (none)

Cannot find module (UDP-MIB): At line 0 in (none)

Cannot find module (HOST-RESOURCES-MIB): At line 0 in (none)

Cannot find module (SNMPv2-MIB): At line 0 in (none)

Cannot find module (SNMPv2-SMI): At line 0 in (none)

Cannot find module (NOTIFICATION-LOG-MIB): At line 0 in (none)

Cannot find module (DISMAN-EVENT-MIB): At line 0 in (none)

Cannot find module (DISMAN-SCHEDULE-MIB): At line 0 in (none)

Cannot find module (UCD-SNMP-MIB): At line 0 in (none)

Cannot find module (UCD-DEMO-MIB): At line 0 in (none)

Cannot find module (SNMP-TARGET-MIB): At line 0 in (none)

Cannot find module (NET-SNMP-AGENT-MIB): At line 0 in (none)

Cannot find module (HOST-RESOURCES-TYPES): At line 0 in (none)

Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none)

Cannot find module (SNMP-MPD-MIB): At line 0 in (none)

Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)

Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)

Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none)

Cannot find module (IP-FORWARD-MIB): At line 0 in (none)

Cannot find module (NET-SNMP-EXTEND-MIB): At line 0 in (none)

Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)

Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none)

Cannot find module (SNMPv2-TM): At line 0 in (none)

Cannot find module (NET-SNMP-VACM-MIB): At line 0 in (none)

How should I handle it?

P.S. I am installing net-snmp in that device using makefile from the site

https://dev.openwrt.org/browser/packages/net/net-snmp/Makefile?rev=25486

2

2 Answers

1
votes

The easiest way to stop this error from popping would be to create an snmp.conf file in /etc/snmp folder (if it is not created already) and add the following line

mibs : 

it should solve the issue.

0
votes

You need to install the missing MIBs specified in the error message, or disable MIB errors with the appropriate option:

snmpget -Pe ...