Writing Custom SNMP Probes for InterMapper
Custom Probes provide a mini-report of the current status of a device. InterMapper retrieves certain data values from the device being tested, then displays the results in a Status Window. In addition, you can establish thresholds, and have InterMapper send alerts when the collected data value(s) fall outside those thresholds.
Three Important Questions
Before you begin to write an InterMapper probe, you should think about your equipment and how you want to test it:
- What data values do you want InterMapper to retrieve? List the operational parameters that InterMapper will monitor and use as the basis for its alarms.
- What limits/thresholds do you want to compare the values to? These are the high/medium/low settings against which InterMapper will compare the retrieved data.
- How do you want to see the information displayed in the device's Status Window? Sketch out (even on paper) the order/placement of the data that is important to you.
Once these answers are in hand, you've completed the design of the probe. Next, you need to retrieve the desired information from the device.
For SNMP-speaking device, you'll need to know the SNMP OIDs ("Object IDentifiers") that correspond with the desired data values. The OIDs are defined in a MIB file that you can generally get from the vendor's web site or other MIB repository. (See below for various sources of MIBs.)
You will also want a MIB browser program (see below) to make sense of the MIB. This will show the OIDs for the desired values, as well as their definitions and data formats.
Getting Started
Writing Custom SNMP probes for InterMapper is straightforward, and follows this basic process:
- Start by making a probe using the Interactive Probe Builder. This creates a text file that you can save to your hard drive.
- You can then import this file into InterMapper.
- If you wish to make changes to the probe, you can edit the text file and re-import it.
Each time you reprobe a device, InterMapper will retrieve the data values you specified (in the OIDs) and compare those values your thresholds. This will determine the status of the device (OK, warning, alarm, or critical state, etc.) Finally, InterMapper will format the data in a Status Window as specified in the probe.
Each probe file has "sections" into which you enter the kinds of information listed above.
- <snmp-device-variables> section: a place to enter the OIDs that you want to retrieve
- <snmp-device-thresholds> section: a place to compare the retrieved values to your limits/thresholds
- <snmp-device-display> section: a place to format the displayed values for the Status Window
Read more about probe sections. These sections are further defined in the online InterMapper Developer Guide.
After you've filled in these sections of the probe file, save it in the InterMapper Settings/Probes folder (be sure to change the file name to something unique), then Reload Probes to make it available to InterMapper. Use Set Info... -> Set Probe... to select your new probe.
Once you've imported the probe, you can edit it with your favorite text editor, save the changes, Reload Probes, and you should see the changes reflected.
Additional Resources for Probe Writers
Interactive SNMP Probe Builder You can simply enter MIB variable names or OIDs into the SNMP Probe Builder web page and it will create a complete probe that can be imported into InterMapper.
Review an Example Probe You can read the Example Probe file as an annotated example file that describes the various sections of the probe file, and shows how probes work.
Example Probe File The downloadable Example file matches the file shown above.
Prototype Probe File for download The Prototype file provides a bare-bones template that you can fill in for your purposes. Prototype Probe File
On-demand Table Maker You can easily create on-demand tables for custom probes by copying the relevant parts from a MIB and pasting them into the On-demand Table Maker page.
Using SNMPWalk to Query a Device InterMapper has an SNMP Walk facility. This is described in the Debugging with SNMPWalk section of the Developer Guide.
Additional Trap Handling Facilities You can also read additional information about creating custom SNMP probes that handle traps. The documentation is SNMP Trap Handling.
SNMP MIB Browsing Tools There are many MIB browsing tools. They make it much easier to read the MIBs and discover the OIDs you need. One good freeware tool is Mibble. There's also an on-line MIB Viewer at the SimpleWeb site.
Information about SNMP There are a number of sites devoted to disseminating information about SNMP:
- SimpleWeb has information about the SNMP standards, a frequently updated list of events and conferences, as well as a number of SNMP tutorials, a MIB Viewer (mentioned above), and an on-line MIB Validator to check that your MIB is properly formatted,
Sources of MIBs You can find MIB files in lots of places:
- Contact your equipment vendor directly or search their web site to get MIBs for their hardware.
- You can often use a search engine for "vendor-name MIB" to find relevant MIBs.
- SimpleWeb's MIB Viewer (above) displays a large number of MIBs from the IETF, IANA, Microsoft, HP, and Internet-Drafts.
- Cisco's SNMP Object Navigator searches and displays a large number of Cisco-specific MIBs.
- The MIB Depot site has a huge collection of MIBs for a variety of industry standards as well proprietary/vendor MIBs.
- The RFC Editor at the IETF (Internet Engineering Task Force) keeps a list of industry standards, MIBs, and RFCs.
|