Smarts SAM: How to set Severity based on varbind value using the trap adapter for an incoming trap
search cancel

Smarts SAM: How to set Severity based on varbind value using the trap adapter for an incoming trap

book

Article ID: 303840

calendar_today

Updated On:

Products

VMware Smart Assurance

Environment

VMware Smart Assurance - SMARTS

Resolution

How to set Severity based on varbind value using the Smarts SAM trap adapter for an incoming trap



The following example shows how to set Severity based on varbind 1 using the Smarts SAM trap adapter. This is done in the trap_mgr.conf file found here:

<BASEDIR>/smarts/local/conf/icoi/trap_mgr.conf

Example
In the following example, Severity will be set to 1,2 or 3 based on Varbind 1 value of AT,WR or IN.

IMPORTANT! Be sure to leave a space between the "=" and the values in the Map configuration settings, or a "Bad entry in trap_mgr.conf" error will be logged in the trap adapter log. To prevent the "Bad entry" error, the setting in the Map configuration in the following example must be AT = 1 and not AT=1.

BEGIN_TRAP * 1 *
           ClassName:    Host
           InstanceName: $SYS$
           EventName:   $V*$
           Severity:    $V1-severity$
           UnknownAgent: CREATE
           State:           NOTIFY
           EventType:        MOMENTARY
           Expiration:       360
           EventText:        $V1$
           Map:         {
                V1-severity
                AT = 1
                WR = 2
                IN = 3
          }
END_TRAP