Importing custom SNMP MIBS to Nagios

In some network enviornments, it is often necessary to import vendor specific SNMP MIB. A MIB is an information database which contains all the SNMP “variables” that can be read from a particular node. It goes without saying, that different nodes will have different SNMP capabilities. Most of these are standardised and can be retrieved by any SNMP server, but some a vendor-specific and in order to read these SNMP values the vendor release their own MIBS which need to be imported into the SNMP server

In our testlab network, we monitor the number of connections present on our gateway. This particular value is not present in the standard SNMP MIBs.

In nagios the procedure was actually pretty simple.

1. Downloaded the sonicwall MIBs from their website

2. Since Nagios uses NetSNMP, just copy the MIB files into /usr/share/snmp/mibs.

3. “check_snmp” is run with “-m ALL”  and it detects the new mib

Furthering my example, all that is needed is to find the correct “variable” (formally referred to as OID in SNMP parlance) and instruct check_snmp to read that. I downloaded a MIB reader, in may case the iReasoning MIB reader (available free over here). Once the MIB browser was installed and downloaded, load the sonciwall MIB files (File > Load Mibs) and search around for the correct OID. In my case, the “Current Connection Cache” was located in

SONIWALL-FIREWALL-IP-STATISTICS > sonicwallFw > sonicwallFwStatsModule > sonicwallFwStats > sonicCurrentConnCacheEntries.

I made a node of the numerical OID : .

From here its just a matter of feeding the OID into the check_snmp command in the switch.cfg file in nagios:

define service{
use                                       generic-service ; Inherit values from a template
host_name                       UK-TL-Gateway
service_description     Number of Connections
check_command           check_snmp!-C public -o . -m all

Note the actual check_snmp command uses -C swtich to define the community SNMP string to read values, the -o switch to define the OID to read, and the -m switch to define which MIB files to load

Privacy Settings

2 thoughts on “Importing custom SNMP MIBS to Nagios

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.