Smarts SAM: How to send multiple varbinds with a Smarts SAM trap; How to configure multiple varbinds for EventName, InstanceName and EventText in one trap
search cancel

Smarts SAM: How to send multiple varbinds with a Smarts SAM trap; How to configure multiple varbinds for EventName, InstanceName and EventText in one trap

book

Article ID: 327749

calendar_today

Updated On:

Products

VMware

Environment

VMware Smart Assurance - SMARTS

Resolution

How to configure multiple varbinds for EventName, InstanceName and EventText attributes
How to send multiple varbinds with a Smarts SAM trap




To configure multiple varbinds to be sent with a Smarts SAM trap, do the following:

  1. Using sm_edit, configure multiple attributes in the Smarts SAM trap_mgr.conf configuration file to use the appropriate trap varbind values.
  2. Define the varbind values which can be used by required attributes while sending the trap.
  3. Reload the changes to apply them in the active environment.

See the following section for an example configuration of three varbinds that could be configured and sent with a trap. 

Example
The following shows an example that would set up three attributes (EventName, InstanceName and EventText) with corresponding varbinds that could be sent along with the trap:

BEGIN_TRAP .1.3.6.4.1.9.10 0 10
        ClassName:        Host
        InstanceName:     $SYS$
        EventName:        $V1$
        InstanceName:  $V2$
        EventText:  $V3$
        ElementClassName: Host
        ElementName:      $SYS$
        Severity:         1
        Map:       {
                          V1
                          1 = rebooted
                          2 = down
                        }
                        {
                          V2
                          1 = X.X.X.X <---IP Address>
                          2 = Node
                          3 = Router
                          4 = Switch
                        }
                        {
                          V3
                          1 = Managed Device
                          2 = Unmanaged Device
                        } 
        Expiration:       600
        State:            NOTIFY
        UnknownAgent:     CREATE
        EventType:        MOMENTARY
        LogFile:  Test
        ClearOnAcknowledge:     TRUE
END_TRAP


Now, if a trap is sent as follows:

sm_snmp -d localhost -p 162 trap X.X.X.X .1.3.6.4.1.9.10 0 10 0 .1.3.6.4.1.9.10 i 1 .1.3.6.4.1.9.10 i 2 .1.3.6.4.1.9.10 i 1

A notification would be seen on the SAM notification log console with the details determined by the definitions set for the three trap varbind values received (V1=1/V2=2/V3=1), as follows:

EventName: rebooted
InstanceName: Node 
EventText: Managed Device