Smarts SAM: How to create and send a Test Trap to test Notify and Clear in Smarts SAM
search cancel

Smarts SAM: How to create and send a Test Trap to test Notify and Clear in Smarts SAM

book

Article ID: 303973

calendar_today

Updated On:

Products

VMware

Issue/Introduction

Symptoms:
Smarts SAM: How to create and send a Test Trap to test Notify and Clear in Smarts SAM

Environment

VMware Smart Assurance - SMARTS

Resolution

How to create and send a Test Trap to test Notify and Clear in Smarts Service Assurance Manager (Smarts SAM)


 

To create and send a test trap to test whether Smarts SAM is able to receive and clear trap notifications, the following tasks must be done:

  1. Create and add test trap definition to the Smarts SAM trap_mgr.conf configuration file.
  2. Turn on debug and logging in the Smarts SAM trap_mgr.conf configuration file. 
  3. Save and close the trap_mgr.conf configuration file and restart the trap adapter.
  4. Send test trap
  5. Analyze trap notification processing in logs.
  6. Send trap clear.
  7. Analyze trap clear processing in logs.

The following explains each of these tasks in detail:

  1. Open the trap_mgr.conf configuration file for editing using sm_edit. This file will be found here: 

    <BASEDIR>/SAM/smarts/local/conf/icoi

    IMPORTANT! You should always use sm_edit whenever you are editing Smarts configuration files (*.conf). Using other editors can cause issues with Smarts software functionality.
     
     
  2. Add the following trap definition to trap_mgr.conf configuration file:

    # TEST traps
    BEGIN_TRAP .1.3.6.1.4.1.2853 6 1
    Category:                       OpsMgr.Event
    ClassName:                      OpsMgr.$V1$
    InstanceName:                   $V4$
    EventName:                      $V3$
    ElementName:                    $V4$
    SysNameOrAddr:                  $V4$
    Severity:                       $V2-sev$
    EventText:                      $V7$
    State:                          $V6-STATE$
    EventType:                      DURABLE
    ClearOnAcknowledge:             FALSE
    Expiration:                     0
    Map:    { 
            V2-sev 
            0 = 5 
            1 = 3 
            2 = 1
    }

            V6-STATE 
            0 = NOTIFY 
            151 = NOTIFY 
            255 = CLEAR
    }
    ElementClassName:               Host
    UnknownAgent:                   IGNORE
    LogFile:                        TEST-traps.log
    END_TRAP


     
  3. Find the "Option Settings/Flags" section of the trap_mgr.conf configuration file.
  4. Turn on debug (DEBUG-TRUE) and logging (LOGGING=ALL) as shown in the following:

    ########################## Option Settings/Flags ##########################
    # --------------------------------------------------------------------------
    # This flag enables debug in the Trap Processor.  With this flag set, verbose
    # status messages will be generated, but the Trap Processor may have
    # difficulty keeping up with a heavy Trap volume.
    # --------------------------------------------------------------------------
    DEBUG = TRUE 

    # --------------------------------------------------------------------------
    # This flag enables logging in the Trap Processor.  This flag takes four
    # options:  'ALL', 'DISCARD', 'STATUS', and 'OFF'.
    #  o 'ALL'     - All will log traps received, discarded, and server status.
    #  o 'DISCARD' - Discard will log discarded traps and server status.
    #  o 'STATUS'  - Status will log server status changes.
    #  o 'OFF'     - Off will produce only error logging.
    # --------------------------------------------------------------------------
    LOGGING = ALL 

     
  5. When the changes to the trap_mgr.conf configuration file are complete, save and close the file.
  6. Restart the Smarts SAM trap adapter.
  7. Send Notify Trap. and observe Varbind 6 in test trap. To ensure Varbind 6 device is actually in the Smarts IP topology, you will need to modify Varbind 6 with your device name.

    Notify Trap   (Varbind 6 = 0 Notify, Mapped in definition V6-STATE   0 = NOTIFY)

    ./sm_snmp -d x.x.x.x -p 162 trap x.x.x.x .1.3.6.1.4.1.2853 6 1 0 .1.3.6.1.4.1.2349.2.2.2.1 s "AvailabilityHealth" .1.3.6.1.4.1.2349.2.2.2.2 i 2 .1.3.6.1.4.1.2349.2.2.2.3 s "Exchange 2007 Public Folder Database Alert" .1.3.6.1.4.1.2349.2.2.2.4 s "lwqun242.lss.emc.com" .1.3.6.1.4.1.2349.2.2.2.5 s "Public MDB" .1.3.6.1.4.1.2349.2.2.2.6 i 0 .1.3.6.1.4.1.2349.2.2.2.7 s "the Public Folder Database"

     
  8. Open the debug log in vi to analyze/debug the trap:

    vi ../local/logs/sm_trapd_en_US_UTF-8.log 

     
  9. Look to see if the trap was ignored if the device was not in the topology.
  10. Open the DAN813-OI.audit log in vi to look for Notify and Clear:

    vi ../local/logs/DAN813-OI.audit

     
  11. Send Clear trap and observe Varbind 6:

    Clear Trap   (Varbind 6 = 255 Clear, Mapped in definition V6-STATE  255 = Clear)

    ./sm_snmp -d x.x.x.x -p 162 trap x.x.x.x .1.3.6.1.4.1.2853 6 1 0 .1.3.6.1.4.1.2349.2.2.2.1 s "AvailabilityHealth" .1.3.6.1.4.1.2349.2.2.2.2 i 2 .1.3.6.1.4.1.2349.2.2.2.3 s "Exchange 2007 Public Folder Database Alert" .1.3.6.1.4.1.2349.2.2.2.4 s "lwqun242.lss.emc.com" .1.3.6.1.4.1.2349.2.2.2.5 s "Public MDB" .1.3.6.1.4.1.2349.2.2.2.6 i 255 .1.3.6.1.4.1.2349.2.2.2.7 s "the Public Folder Database"