snmp dont work with nagios "Cannot find module"
snmp dont work with nagios "Cannot find module"
Yesterday snmp worked fine, uptime, bandwidth, por status, all, now i run a command to check uptime and cannot find any mib, my mibs are in /usr/share/snmp/mibs, and when i put the command of check uptime it tel me the mib path /usr/local/share/snmp/mibs, and i dont have any directory of snmp in /usr/local/share, how can i change the mib path?
Re: snmp dont work with nagios "Cannot find module"
Try testing the command and post the full output of the test.
Re: snmp dont work with nagios "Cannot find module"
You can run the following to find out what the default mib path for the net-snmp is:
Your version of snmp was probably configured with a different default '--datadir=' than is assumed. What is the output of:
Code: Select all
net-snmp-config --default-mibdirs
Code: Select all
net-snmp-config --configure-options
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: snmp dont work with nagios "Cannot find module"
Code: Select all
MIB search path: /home/nagios/.snmp/mibs:/usr/local/share/snmp/mibs
Cannot find module (SNMPv2-MIB): At line 0 in (none)
Cannot find module (IF-MIB): At line 0 in (none)
Cannot find module (IP-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 (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-MPD-MIB): At line 0 in (none)
Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
Cannot find module (SNMP-FRAMEWORK-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-PASS-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)
sysUpTime.0: Unknown Object Identifier (Sub-id not found: (top) -> sysUpTime)
Code: Select all
$ net-snmp-config --default-mibdirs
-sh: 43: net-snmp-config: not found
$ sudo net-snmp-config --default-mibdirs
sudo: net-snmp-config: command not found
$ net-snmp-config --configure-options
-sh: 45: net-snmp-config: not found
Re: snmp dont work with nagios "Cannot find module"
Do you have it set in your environment?
Code: Select all
env | grep MIB
Re: snmp dont work with nagios "Cannot find module"
It show me nothing, all happened when i installed pnp4nagios D:! its some thing that pnp4nagios change the path to view the mibs or something?
Re: snmp dont work with nagios "Cannot find module"
Try this:
Create a new file:
Add this line in it and save it:
Now run this command and it should show you it will now look in the proper directory as well:
Try your command again.
Create a new file:
Code: Select all
/usr/share/snmp/snmp.conf
Code: Select all
mibdirs +/usr/share/snmp/mibs
Code: Select all
snmptranslate -Dinit_mib .1.3 2>&1 |grep MIBDIR
Re: snmp dont work with nagios "Cannot find module"
sorry, cant work :s, i dont understand, all runs fine, i installed pnp4nagios and now snmp commands dont work :c
Re: snmp dont work with nagios "Cannot find module"
So i think that is bug of net-snmp package, i search and search and no one have the solution.
Re: snmp dont work with nagios "Cannot find module"
Can you post how you are running the check showing the errors?
Where did you get the plugin?
Please run the following and post the output here.
Where did you get the plugin?
Please run the following and post the output here.
Code: Select all
yum list |grep snmp
Be sure to check out our Knowledgebase for helpful articles and solutions!