Add new MIBs

From NetXMS Wiki
Jump to: navigation, search

What are MIBs good for

MIB files (MIBs) describe structure of information transferred via SNMP. Every device can support multiple MIBs, some of them are standard and public, other can be proprietary and vendor specific. NetXMS uses compiled MIBs to allow you to select OID and see its description (for example when selecting SNMP data for DCI collection). You do not need to compile new MIBs if you are OK with direct input of OID.

Find existing MIBs

By default, netxms Linux installation comes with all .txt files from /usr/share/netxms/mibs compiled to /usr/share/netxms/mibs/netxms.mib. (Path will be different if you provided value for ./configure --prefix=)

Compiling MIBs

  1. Change suffix of your new MIB file to .txt
  2. Copy your MIB file to /usr/share/netxms/mibs
  3. Use nxmibc binary to create a new compiled MIB file from all MIBs in directory. Add parameter -z for compressed output file.
 nxmibc -d /usr/share/netxms/mibs -o /usr/share/netxms/mibs/netxms.mib
 C:\NetXMS\bin\nxmibc.exe -z -d C:\NetXMS\share\mibs -o C:\NetXMS\var\netxms.mib

Parameters recognized by nxmibc:

nxmibc [options] source1 ... sourceN

Valid options:
   -d <dir>  : Include all MIB files from given directory to compilation
   -o <file> : Set output file name (default is netxms.mib)
   -P        : Pause before exit
   -s        : Strip descriptions from MIB objects
   -z        : Compress output file

If you are using debian packages as installation source (NetXMS apt repo), you should run this:

nxmibc -d /usr/share/netxms/mibs -o /var/lib/netxms/netxms.mib -z

Troubleshooting

If nxmibc fails, it may be caused by syntax or import errors in your MIB. Try to check it with smilint (part of net-snmp package) and correct any errors on level 3.