SCOM: A Net-SNMP Management Pack for UNIX Monitoring, Part I – Desiging the MP

The Net-SNMP agent is a cross-platform SNMP agent that is often bundled with UNIX (e.g. Solaris) and Linux distributions (including VMWare and Checkpoint Splat).   The agent implements some relatively standard MIBs, such as the UC Davis (UCD-SNMP-MIB) and HOST-RESOURCES MIBs, exposing a good selection of operating system metrics for monitoring.  Furthermore, the agent is remarkably extensible in a few different ways.  The agent can be extended with “dlMod” module extensions to integrate additional SNMP components, such as the VMWare or HP Insight Management Agent modules.   Additionally, the Net-SNMP agent can be configured to proxy for another SNMP agent listening on a different port, which is how the Sun SunFire Management Agent is typically configured.   Lastly, the Net-SNMP agent provides the ability to define processes, files, extensible objects, load average objects, and disks for specific monitoring.  For each of these, directives are configured in snmpd.conf with parameters and thresholds, and an SNMP table is exposed that will return the monitored value and status value to an SNMP poll, on-demand.   I had previously  posted an article on using the ext (Extensible Object/Arbitrary Extension) capabilities of the Net-SNMP agent to utilize shell scripts for monitoring of Sun hardware.   With this degree of flexibility, it’s easy to understand why the Net-SNMP agent is so widely utilized.

Design Approach for the Net-SNMP Management Pack

Building on the lessons learned from developing the Cisco Management Pack, I wanted to create a management pack with similar capabilities for monitoring of Net-SNMP agents, followed by a set of management packs for monitoring of vendor-specific hardware (e.g. HP Proliant servers running Linux).   After some thought, I decided that it would be advantageous to split the Net-SNMP management pack into two separate management packs, one that defines the base classes and performs discovery of the classes and one for the actual monitoring.   The reason for this is that I wanted a base management pack without any actual monitoring functions so that it could easily (and more flexibly) be reused for future hardware monitoring management packs.   To illustrate this point, if the native UNIX agent capabilities of R2 are being used to monitor OS-level objects, there is still a need to discover the Net-SNMP agent and create base classes for use in SNMP-based hardware monitoring, but in this case, monitoring OS-level objects with SNMP and the OpsMgr agent would be redundant.  With the multiple MP approach, just the base Net-SNMP management pack could be imported along with the hardware monitoring management packs, skipping the Net-SNMP monitoring management pack altogether.  Additionally, I wanted to leave the monitoring management pack unsealed for easy customization, and MP references can only be made to sealed management packs.  In this way, the Net-SNMP Library MP will be sealed, but the monitoring MP can remain unsealed.

The Net-SNMP Library Management Pack

As described above, this management pack just defines the Net-SNMP object classes and performs the discovery of these objects.  The discovery methodology is pretty much the same as in the Cisco Management Pack, but I did do some things a bit differently.  Most notably, I added an additional layer of classes in the containment hierarchy.   In this management pack, the Net-SNMP Device class hosts a set of containment classes such as Network Interfaces, Volumes, and Monitored Processes.  These classes in turn host the actual objects to be monitored:  Network Interface, Volume, and Monitored Process.  My motivation for this was primarily to keep the object relationships more neatly organized, particularly when viewing the objects in a Diagram View.   This does add a slight degree of complexity, but I think the benefits of having a more usable Diagram View justify the additional complexity. 

I chose to create hosted classes for the following objects:  Network Interfaces, Volumes (logical disks and memory pools from the hrStorage table), Monitored Processes, Monitored Files, and Monitored Extensible Objects.   I ignored the customizable Load Average and Disk monitoring capabilities of the Net-SNMP agent because those objects can be monitored through existing SNMP objects in the UCD-SNMP and HOST-RESOURCES MIBs and I wanted to keep the monitoring configuration within OpsMgr as much as possible (instead of in the agent snmpd.conf).   The Files, Processes, and Extensible Objects monitoring capabilities of the Net-SNMP agent cannot easily be replicated with other SNMP monitors, so I included those to maintain a high degree of monitoring extensibility. 

The class diagram for the Net-SNMP Library MP is:

Results

With just the NetSNMP.Library MP imported, the Diagram View is a pretty good demonstration of the MP in action:

Advertisements

About Kristopher Bash
Kris is a Senior Program Manager at Microsoft, working on UNIX and Linux management features in Microsoft System Center. Prior to joining Microsoft, Kris worked in systems management, server administration, and IT operations for nearly 15 years.

4 Responses to SCOM: A Net-SNMP Management Pack for UNIX Monitoring, Part I – Desiging the MP

  1. John Bradshaw says:

    Kris,
    This is great stuff! Thankyou very much.
    JB

  2. Tolga says:

    Hi Kris,

    Would love to see how you did that. In my test setup, the network interfaces, volumes, files, processes are listed but they are just empty circles, nothing is contained in the diagram view.

    When I check the Health Explorer, CPU System Percent Utilization, Free Real & Swap Memory monitors etc. but they are not displayed in the diagram view.

    I have imported the management pack to Microsoft’s Authoring Console and simulated the rules and monitors. At that point I have seen that under the “Target Expressions” section the community string is blank. When I enter the community string manually and rerun the simulation, the data was captured fine.

    I have rechecked the snmp.conf file, the traps using the Byte Sphere’s OIDview and ensured that there is no problem with the snmp traps. It seems that I have a problem with the management pack, which seems to me that it is not aware of the community string. The string was entered properly during device discovery.

    Can you recheck the configuration once again and publish if there is any post-configuration steps? I have followed your Net-SNMP Management Packs document [dated 09/17/2009] but frankly it did not help with configuration.

    Thanks,
    Tolga

  3. naveed says:

    Hi kris

    i had deployed net-snmp mp i am unable to get alert for real memory utilization red hat linux server

  4. shahnaveediqbal says:

    Dear Krish,

    i had installed the net-snmp mp for scom 2007 r2 unable to monitor realmemory free counter.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: