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:
The following explains each of these tasks in detail:
<BASEDIR>/SAM/smarts/conf/icoiIMPORTANT! You should always use sm_edit whenever you are editing Smarts configuration files (*.conf). Using other editors can cause issues with Smarts software functionality.
# 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: CREATE
LogFile: TEST-traps.log
END_TRAP
./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 Alert" .1.3.6.1.4.1.2349.2.2.2.4 s "<HOSTNAME>" .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"
vi ../local/logs/sm_trapd_en_US_UTF-8.log
vi ../local/logs/OI.audit
./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 Alert" .1.3.6.1.4.1.2349.2.2.2.4 s "<HOSTNAME>" .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"
Another Example of Notify and CLEAR
BEGIN_TRAP .1.3.6.1.4.1.9.9.138.2.* 6 1 ClassName: Host InstanceName: $SYS$ EventName: ceAlarmAsserted-$V1$-$V2$ Severity: 1 EventText: ceAlarmHistEntPhysicalIndex = $V1$, ceAlarmHistAlarmType = $V2$, ceAlarmHistSeverity = $V3$, ceAlarmHistTimeStamp = $V4$ Expiration: 0 State: NOTIFY EventType: DURABLEEND_TRAPBEGIN_TRAP .1.3.6.1.4.1.9.9.138.2.* 6 2 ClassName: Host InstanceName: $SYS$ EventName: ceAlarmAsserted-$V1$-$V2$ EventText: ceAlarmHistEntPhysicalIndex = $V1$, ceAlarmHistAlarmType = $V2$, ceAlarmHistSeverity = $V3$, ceAlarmHistTimeStamp = $V4$ State: CLEAREND_TRAP