SCOM: Advanced SNMP Monitoring Part IV: Making the Cisco MP SP1 Compatible
September 17, 2009 3 Comments
As previously mentioned, the Cisco Management Pack that I have been describing in the past several posts is specific to OpsMgr R2, due to its reliance on the capability of the System.SnmpProbe’s function to return multiple items in an SNMP walk, which is a feature introduced in R2. My intention was to design the management pack so that it could easily be made SP1 compatible by substituting the discovery methodology, but keeping the classes and monitoring objects intact. I am still doing more testing to finalize the SP1 version, but in this post, I am going to introduce the discovery methods that I have implemented for SP1 compatibility.
In general, when dealing with SNMP objects stored in tables, options in SCOM 2007 SP1 are a bit limited. If the table objects are static, rules could be configured targeting specific OID’s, but this is unlikely to be a common scenario. Another option (and a quite good one) would be to segregate monitoring duties between SCOM (for servers and applications) and a task-specific SNMP monitoring tool like SolarWinds or JalaSoft for SNMP device monitoring. But for the purposes of this management pack, the option I pursued involves wrapping an external SNMP provider in WSH scripts to perform the discovery. I chose to use the WMI provider because of its easy use in VBscripts and object-oriented capabilities, but something like the Net-SNMP binaries could be called with ShellExec methods in a vbs script to accomplish the same goal.
Before I get into the use of the WMI SNMP provider in this MP, there is some background information that should be discussed. Firstly, when the WMI SNMP provider is installed, it includes support only for the RFC-1213 MIB. In order to use the WMI SNMP provider for OID’s not in the RFC-1213 MIB, the MIB files must be converted to MOF files with smi2smir.exe and then imported with mofcomp.exe. This can get a bit tricky, largely depending on how well constructed the vendor’s MIB is and the dependencies of the MIB. Once these steps are completed, the WMI SNMP provider exposes SNMP objects as collections that can be accessed natively in VBscripts. However, the WMI provider is not terribly scalable and when overloaded with requests, WMI will cease to function in a timely fashion. I had done some testing with using the WMI SNMP provider for rules and monitors, but decided against this approach due to the ease with which the provider can be overloaded when monitoring a handful of objects with reasonably aggressive frequencies. On the other hand, discoveries are not as time-sensitive as monitors/rules and don’t need to run as frequently, so by using the WMI SNMP provider for discoveries, and the System.SnmpProbe provider for monitors and rules, this hybrid approach should remain pretty scalable.
Implementation Overview