Using Nagios MIBs with a SonicWALL

MIB (short for Management Information Base), is an index based on a network standard that categorizes data for a specific device so SNMP servers can read the data. SonicWALL MIBs are specific to device AND firmware.  Each can be downloaded from www.mysonicwall.com (you will need to have an account to download).  Click on Downloads, Download Center and then find the firmware that you are running.  Then click on “SNMP MIBs” to download.

Once downloaded, copy the MIB files to /usr/share/snmp/mibs to prepare them for loading into NetSNMP. Then run check_snmp with a -m option followed by ALL so that Nagios will detect the new MIBs:
check_snmp -m ALL
Once complete, determine the OID. OID’s are MIB variables that instruct an SNMP server monitor to look for information on the device. These variables can be determined by reading the MIBs.  One tool that assists with doing this is MIB Browser by iReasoning Networks http://tl1.ireasoning.com/mibbrowser.shtml  MIB Browser can run on Windows, Mac OS X, and Linux/UNIX.  To obtain the appropriate OID’s:
  1. Load the MIBs in MIB Browser by going to File > Load Mibs
  2. Manually comb through to find the OID you want (a string used in the SonicWALL Web Configuration).

To put this into use, let’s prepare an snmpwalk from a TZ100. First, download the SNMP MIBs from MySonicWALL.com for a TZ100 running firmware version (5.6.0.12-65o). Then let’s load the MIB for SONICWALL-FIREWALL-IP-STATISTICS-MIB into MIB Browser. Searching for “CPU” (Edit -> Find in MIB Tree) shows sonicCurrentCPUUtil, the OID for this fact is .1.3.6.1.4.1.8741.1.3.1.3.0. We used the OID shown in the drop-down near the menu in the MIB Browser. This shows the full OID, which sometimes includes a “0″ at the end (shown towards the bottom of the window). Next, add the OID into a switch.cfg file in nagios:

define service{
use                                       generic-service ; Inherit values from a template
host_name                       TZ100
service_description     CPU Utilization
check_command           check_snmp!-C public -o .1.3.6.1.4.1.8741.1.3.1.3.0 -m all
}

These settings include the following:

  • host_name: the name of the device (whatever you want to call it)
  • service_description: the name of the service you are monitoring (whatever you want to call it)
  • check_command: -C is to define the community SNMP string, -o is to define the OID to read, -m is to define which MIB files to load – to be more specific, for this example you can narrow “-m all” to “-m SONICWALL-FIREWALL-IP-STATISTICS-MIB.MIB”

Overall, setting up Nagios to be able to leverage MIBs from 3rd party vendors is an easy task, if not tedious when there are a lot of settings you’d like to walk through with SNMP.

    Tags: , , ,

    Comments are closed.