Smarts SAM Adapters: How to configure alertmapper.conf for Smarts SAM Microsoft Operations Manager 2007 Adapter
search cancel

Smarts SAM Adapters: How to configure alertmapper.conf for Smarts SAM Microsoft Operations Manager 2007 Adapter

book

Article ID: 332110

calendar_today

Updated On:

Products

VMware Smart Assurance

Environment

VMware Smart Assurance - SMARTS

Resolution

This article explains how to configure Microsoft Operations Manager 2007 Adapter alertmapper.conf configuration file, located at : <SAMAdapters>\smarts\conf\OpsMgr2007\event\AlertMapper.conf



The settings in the alertmapper.conf configuration file determine how events coming from Microsoft OpsMgr are mapped into the Smarts SAM console.
 
There are four sections/types of entries in the alertmapper.conf file.

  • Default: Identifies the notification fields. This section allows you to define the values for the fields. Values defined here can and may be overwritten by the either the eventMgr.asl file or by the hook script file.
  • Template: Defines a single template. A template is used to configure fields that are used in multiple places in the file. A template can extend another template allowing for hierarchies.
  • Rules: Defines the rules that are used to configure the notification fields. The rules define the conditions that are used to identify the type of notification, define which template to be used, and any additional parameters to be configured.
  • Finally: Specifies which template to use and which fields to configure when no template satisfies any of the rules defined in the Rules section.


The following presents the considerations and examples for configuring entries in the different sections of the alertmapper.conf file.

Default section
Customers should set the default section to set variables and mappings that are common for most of the events.  These may be overridden by subsequent templates or rules.

Template section
A template entry can either inherit directly from the default settings, or inherit from another template. Let's examine the following example:

Template GenericTemplate
{
UserDefined1 = "This is the base template"
UserDefined2 = "This is the base template sub-definition"
}
 
Template SoftwareService extends GenericTemplate
{
UserDefined1 = "This is a software Service"
}
 
Template HardwareRouter extends GenericTemplate
{
UserDefined1 = "This is a hardware router"
UserDefined2 = "This is hardware router sub-definition"
}

Note the following about the above example:

  • If a rule uses the GenericTemplate, the UserDefined1 would be set to "This is the base template" and UserDefined2 would be set to  This is the base template sub-definition"
  • If a rule uses the SoftwareService template, UserDefined1 would be set to "This is a software Service" and UserDefined2 would still be set to  This is the base template sub-definition"
  • A rule using the HardwareRouter template would cause UserDefined1 to be set to "This is a hardware router" and UserDefined2 would be set to  This is hardware router sub-definition".


Rules section
The Rules section is where Operations Manager events are mapped to Smarts SAM notifications. The system will process the rules in the order in which they are present in the alertmapper.conf file. Once a rule is matched, no further rules are processed. Therefore, the rules should go from most specific to least specific. The following is an example of a rules section:

Rules
{
    Test E_ClassName == 'Microsoft.Windows.InternetInformationServices.2003.WebSite'
        Use DefaultOpsMgrTemplate
        ClassName               = "SoftwareService"
        ClassDisplayName        = ClassName
        EventName               = E_EventName
        CreateClassName         = "Host"
        CreateClassInstance     = ComputerName
 
    Test E_ClassName == 'Microsoft.Windows.Computer' 
        Use HostPerformanceTemplate
 
    Test E_ClassName =* 'Microsoft.*'
        Use DefaultOpsMgrTemplate 
 
    Test E_ClassName =* 'TCPPortCheck_*Group'
        V_CreateNotification    = "FALSE"
 
    Test E_ClassName =* 'TCPPortCheck_*'
        Use DefaultOpsMgrTemplate 
        ClassName               = "SoftwareService"
        ClassDisplayName        = ClassName
        EventName               = "${E_EventName}-${E_InstanceName}"
        CreateClassName         = "Host"
        CreateClassInstance     = ComputerName
 
}

 
In the above example, note the following:

  • Events coming from Operations Manager concerning the IIS 2003 Webserver would use the DefaultOpsMgrTemplate, set ClassName to "SoftwareService", and so on.
  • Events with the ClassName "Microsoft.Windows.Computer" would use the HostPerformanceTemplate.
  • Any other Microsoft events would just use the DefaultOpsMgrTemplate
  • Events which have a TCPPortCheck Group class name would not have an Ionix notification created as the V_CreateNotification is set to "FALSE"
  • Any other TCPPortCheck events would use the DefaultOpsMgrTemplate, and so on.


Finally section
There is only one entry in the "Finally" section.  This is the action to be taken if the event did not match any of the specified rules. Common options here are to use the generic template, or more often set the V_CreateNotification to FALSE.