Luis Olavarrieta's picture

Hi to everyone:

 

Everytime i run a php command from the console i get this error message:

 

root@visum /opt/observium# php discovery.php -u

MIB search path: /opt/observium/mibs

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

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

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

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

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

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

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

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

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

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

Cannot find module (MTA-MIB): At line 1 in (none)

Cannot find module (NETWORK-SERVICES-MIB): At line 1 in (none)

Cannot find module (UCD-DISKIO-MIB): At line 1 in (none)

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

Cannot find module (LM-SENSORS-MIB): At line 1 in (none)

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

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

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

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

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

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

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

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

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

Cannot find module (IPV6-ICMP-MIB): At line 1 in (none)

Cannot find module (IPV6-MIB): At line 1 in (none)

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

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

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

Cannot find module (NET-SNMP-PASS-MIB): At line 1 in (none)

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

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

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

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

__________________

 

please advice

Forum: 
Tags: 
Jeremy Davis's picture

I was able to reporoduce this straight away, so thanks so much for reporting.

It actually took me ages to work out what the issue was. But it seems that there are a few MIBs pre-compiled into the snmp software. But our default config only uses the Observium provided MIBs. The conf file (/etc/snmp/snmp.conf) we ship be default looks like this:

mibdirs /opt/observium/mibs

The fix is to add the Observium provided MIBs to the default, rather than replace them. To do that, the conf file needs a '+' at the start of the path to add. I.e.:

mibdirs +/opt/observium/mibs

You can manually edit the conf file, or just run the sed command below (run as root):

sed -i "s|mibdirs /opt/observium/mibs|mibdirs +/opt/observium/mibs|" /etc/snmp/snmp.conf

After that:

root@observium /opt/observium# ./discovery.php -u

  ___   _                              _
 / _ \ | |__   ___   ___  _ __ __   __(_) _   _  _ __ ___
| | | || '_ \ / __| / _ \| '__|\ \ / /| || | | || '_ ` _ \
| |_| || |_) |\__ \|  __/| |    \ V / | || |_| || | | | | |
 \___/ |_.__/ |___/ \___||_|     \_/  |_| \__,_||_| |_| |_|
                     Observium Community Edition 19.8.10000
                                   http://www.observium.org

-- Database is up to date.

I've opened an issue and I'll apply the fix to the build code and rebuild soonish.

Please post back and confirm that my fix works for you too.

Luis Olavarrieta's picture

is working!!! thanks!!!

Jeremy Davis's picture

Awesome! :)

Add new comment