Hey! These docs are for version 6.3, which is no longer officially supported. Click here for the latest version, 6.7!

SNMP Get requests (or polling) and SNMP Traps communicate data using numeric OIDs (Object IDentifiers). The OIDs are translated from numbers into textual strings and back into numbers using MIBs (Management Information Bases). In Opsview, MIBs are used in the following ways:

  • Translating the numeric OIDs into their textual form for easier reading in the Opsview web UI

  • Translating the textual OIDs entered in the Opsview web UI into their numeric OID form for plugin execution without the need for MIBs on every executor

  • Evaluating trap rules when a trap is received by a trap collector

Manufacturers have to conform to a set of standards for OIDs to work correctly - as a result, common SNMP OIDs should be translated on your Opsview Collector without any extra configuration.

However, many SNMP capable devices have specific attributes that are unique to them and as such may need additional MIBs installed on the Opsview Monitor systems to be able to translate the OIDs.

Some of these additional MIBs may be available through your normal package repository (for example, for [Debian and Ubuntu](🔗)) on each Opsview Monitor server. Other MIBs will need to be obtained from your device manufacturer and installed onto each of the Opsview Monitor servers.

In order to add MIBs to Opsview, you need to first know what the MIB will be used for:

  • If the MIB is to be used for translating incoming traps then it needs to exist on every trap collector

  • If the MIB is to be used for any other purpose such as polling then it only needs to exist on just the master

For the ​translation of incoming traps on trap collectors, place your MIB in one of the appropriate directories on all servers responsible for monitoring the traps (including the master server). The directories for this purpose are:

  • `/opt/opsview/snmptraps/var/load`

  • `/usr/share/mibs`

  • `/usr/share/snmp/mibs`

For translation on the master, place your MIB in the appropriate directory for your distribution:

  • `/usr/share/mibs`

  • `/usr/share/snmp/mibs`

  • custom location (see below)

On the master you can define a custom location for your MIBs, to do so place the MIB files into a directory e.g. `/opt/opsview/var/snmp` and amend your `/etc/snmp/snmp.conf` file to include lines similar to:

This will naturally add the directory to the MIB search path that your command-line SNMP utilities use. You could also add the path to your trap MIBs in `/opt/opsview/snmptraps/var/load` in order to test sending those traps from the command-line

You can see which directories are currently used on your Opsview Monitor system by using a command similar to

### Testing Traps

To test snmp v2 traps:-

For a given host monitored by your orchestrator, assign host template 'SNMP - Accept Traps'. This will add a service check to your host called 'SNMP Trap - Alert on any trap'.

From the orchestrator run the following command (substitute <host/ip>)

The service check 'SNMP Trap - Alert on any trap' should of now gone into a WARNING state with a similar message to

If this hasn't happened then from within the Opsview UI check out the SNMP Traps section under the Configuration menu, it may have gone here.