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.
check_snmp -m ALL
- Load the MIBs in MIB Browser by going to File > Load Mibs
- 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.
