Smarts SAM: SystemRestarted events show InstanceName and ElementName are different, should be the same
search cancel

Smarts SAM: SystemRestarted events show InstanceName and ElementName are different, should be the same

book

Article ID: 331990

calendar_today

Updated On:

Products

VMware Smart Assurance

Issue/Introduction

Symptoms:




Using the standard SystemRestart trap in trap_mgr.conf:

BEGIN_TRAP .1.3.6.1.4.1.733 6 13
       ClassName:             SNMPTrap
       InstanceName:          $V1$
       ElementClassName:      $V2$
       ElementName:           $V1$
       EventName:             SystemRestarted
       Severity:              3
       EventText:             System Restarted
       Expiration:            600
       State:                 NOTIFY
       UnknownAgent:          CREATE
END_TRAP

the InstanceName and ElementName should the same system. However, the actual notification shows two different systems. While rebooting IONIXHOST01, the instancename is correct, but the elementname shows the server where polling happens:

"ClassName: SNMPTrap
InstanceName: IONIXHOST01
Event: SystemRestarted
Element Name: IONIXAGENT01"

Environment

VMware Smart Assurance - SMARTS

Cause

If ElementClass and ElementName are undefined, the trap defaults to the Agent name if it is defined.

Resolution

ForceOccurredOn is an attribute that can be set for the trap that overwrites the ElementClass or ElementName to modify the OccurredOn object when set to TRUE. 


Details on the attribute (from the trap_mgr.conf file):

# <force-occurred-on>           Set this to 'TRUE', if you want to overwrite
#                               the ElementClass and ElementName which will
#                               modify the 'OccurredOn' Object.
#                               Note: The object(ELEMENTCLASSNAME, ELEMENTNAME)
#                                     should exist, otherwise the trap will
#                                     default to having Agent's Name, if it
#                                     exists in the toplogy.


New definition for the SystemRestarted trap in trap_mgr.conf:

BEGIN_TRAP .1.3.6.1.4.1.733 6 13
    ClassName:             SNMPTrap
    InstanceName:          $V1$
    ElementClassName:      $V2$
    ElementName:           $V1$
    ForceOccurredOn:       TRUE
    EventName:             SystemRestarted
    Severity:              3
    EventText:             System Restarted
    Expiration:            600
    State:                 NOTIFY
    UnknownAgent:          CREATE
END_TRAP

Copy the edited version of the trap_mgr.conf file to the local/conf/icoi/ on your system and restart the trap adapter.