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 : .18.104.22.168.4.1.8722.214.171.124.2.0
From here its just a matter of feeding the OID into the check_snmp command in the switch.cfg file in nagios:
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