I receive error “Module not found” when trying to import a MIB file, how to handle that?
Q: When I try to import a MIB file, error message “Module not found” is reported. How can I find what’s wrong with the MIB file and how to handle that?
A: There can be two problems loading MIBs, namely: missing dependencies and incorrect MIB structure.
MIB files are modular. They can include definitions from other MIB files. Simplest way to detect which MIBs are not available is to use snmptranslate utility from Net-SNMP software package. Use the link above to download the package.
Default directory where IPHost Network Monitor’s bundled SNMP library looks for MIBs is
%ProgramData%\IPHost Network Monitor\mibs
After having installed Net-SNMP package run the following command out of cmd.exe command-line prompt (it is assumed the snmptranslate.exe directory is added to PATH):
snmptranslate .1 -M <Path to MIB files> -m <MIB file name>
where <Path to MIB files> is the mentioned above directory where IPHost Network Monitor looks up MIB files.
If some files that current MIBs imports are missing, there will be error similar to this one:
Cannot find module (<Modulename>): At line NN in <MIB file name>
You should look for missing MIB files and add them to MIB directory. We recommend starting your search at our MIB files collection. If you know the vendor of device you need to monitor, please visit also vendor’s site; they often offer to download related MIB files.
In case MIB file structure is broken, the mentioned command will display errors like
<Error message>: At line NN in <MIB file name>
Please pay attention to the mentioned line. Note that most common error is presence of comment delimiter ‘–‘ (two subsequent minus signs) both in the beginning of the line, and somewhere else on the same string.
We also recommend saving MIB files with Un*x-type end of line delimiters (Windows uses DOS-style delimiters by default). MIBs with a mix of different end-of-line delimiters can cause parsing, hard to find errors.