To configure multiple varbinds to be sent with a Smarts SAM trap, do the following:
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