Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Version 0.

For
Ops Team KL

Title:
Document
Type:

OPEN NETWORK MONITORING SYSTEM (OpenNMS)


mib2openNMS
Versio
0.1 Date 15 Mar
Howto
n:
:
2012

Contents
1.

mib2opennms Howto....................................................................................... 3

1.1

Why import the OIDs using this tool?...........................................................3

1.2

Recommendations.....................................................................................3

2.

How to use...................................................................................................... 4

2.1

Single MIB file...........................................................................................4

Title:
Document
Type:

OPEN NETWORK MONITORING SYSTEM (OpenNMS)


mib2openNMS
Versio
0.1 Date 15 Mar
Howto
n:
:
2012

1. mib2opennms Howto
This little document provides an explanation of how to import SNMP
MIBs into OpenNMS, using the open source tool 'mib2opennms'. In
reality we don't import the whole MIB, we just take out the trap
definitions (if there are some) from the MIB and add them as events to
OpenNMS.

1.1 Why import the OIDs using this tool?


OpenNMS has the ability to receive SNMP traps; In order to do
that, OpenNMS must know how to treat each event (thus requires
a description for each OID that it receives). Normally if you don't
do that you will receive anoying messages like the following on
your event database:
Received
unformatted
(enterprise:.1.3.6.1.4.1.2021.250.10
args:

enterprise
event
generic:0 specific:0). 0

Also importing the OIDs by hand is error prone and tedious, so


the use of this tool is a must when adding new OIDs.

1.2 Recommendations
If you intend to use mib2opennms, it is highly recommended you
install net-snmp as chances are high that the MIB(s) you intend
to import are dependent on something contained within the base
set of MIBS provided by net-snmp. Without net-snmp,
mib2opennms may not be able to translate your MIBs, and may
not provide very useful information as to why.
NOTE: If you're using Ubuntu server, the package "net-snmp" no
longer exists in the standard repositories, you will need to get the
"snmp-mibs-downloader" package. This package puts the MIBs in
/var/lib/mibs/ietf by default.

Title:
Document
Type:

OPEN NETWORK MONITORING SYSTEM (OpenNMS)


mib2openNMS
Versio
0.1 Date 15 Mar
Howto
n:
:
2012

2. How to use
2.1 Single MIB file

1. Convert a single mib file and set the value for generic to 6 with
mib2opennms -6 mibfile.mib >mibfile.events.xml

2. Edit the mibfile.events.xml and add as first line a line with


<events>, as last line a line with </events>. Move the file to
$OPENNMS_HOME/etc/events
3. Add a line to $OPENNMS_HOME/etc/eventconf.xml like
<event-file>events/mibfile.events.xml</event-file>

4. Ensure <event-file>events/default.events.xml</event-file> remains


the last entry. Restart OpenNMS and the new events are ready to go.
For most trap definition in mibs this should do the job. If you have
problems see the detailed configuration explanation below and in Event
Configuration How-To.
See also Converting Dell Traps To Events.
Note: If your mibs rely on imports you will need to specify the mib
directory with the -m flag. The base mibs can be installed to
/var/libs/mibs/ietf/ by running the following in Ubuntu:
sudo apt-get install snmp-mibs-downloader
sudo /etc/snmp-mibs-downloader/download-mibs

You might also like