Steps to implement syslog events to alarm monitoring
Spectrum : Any version
OS-XTC 5 PCE_PEER_STATE_CHANGE 0xfff000011
Note: Replace the event code in with the code of the first event you created. 0xfff00011 P "If( Regexp( GetEventVariable( { U 4 } ), { S \"PCEP Peer (.*) state changed to Down\" } ), CreateEventWithVariables( { C CURRENT_MODEL }, { H 0xfff00012 }, SetEventVariable( GetEventVariableList( { C CURRENT_EVENT } ), { U 6 }, GetRegexp( GetEventVariable( { U 4 } ), { S \"PCEP Peer (.*) state changed to (.*)\" }, { U 1 } ) ) ), CreateEventWithVariables( { C CURRENT_MODEL }, { H 0xfff00013 }, SetEventVariable( GetEventVariableList( { C CURRENT_EVENT } ), { U 6 }, GetRegexp( GetEventVariable( { U 4 } ), { S \"PCEP Peer (.*) state changed to (.*)\" }, { U 1 } ) ) ) )"
0xfff00012 E 0 A 2,0xfff00012,6
0xfff00013 E 0 C 0xfff00012,6
Note: Replace the event codes with the code of the first, second and third events you created (0xfff00011 with the first event, 0xfff00012 with the second, 0xfff00013 with the third one)
%{S 1}-{T T1_210017 2}-{S 3}: {S 4}.
PCEP Peer {S 6} state changed to Down
PCEP Peer {S 6} state changed to Up
For the third event, set the second event as the cleared event by third event
Please use the following trap commands to test the above:
snmptrap -v 2c -c public <ss>:162 '' 1.3.6.1.4.1.9.9.41.2.0.1 1.3.6.1.4.1.9.9.41.1.2.3.1.2 s "OS-XTC" 1.3.6.1.4.1.9.9.41.1.2.3.1.3 i 6 1.3.6.1.4.1.9.9.41.1.2.3.1.4 s PCE_PEER_STATE_CHANGE 1.3.6.1.4.1.9.9.41.1.2.3.1.5 s "PCEP Peer x.x.x.x state changed to Down" 1.3.6.1.4.1.9.9.41.1.2.3.1.6 t 173814422100 1.3.6.1.6.3.18.1.3.0 a <ip>
snmptrap -v 2c -c public <ss>:162 '' 1.3.6.1.4.1.9.9.41.2.0.1 1.3.6.1.4.1.9.9.41.1.2.3.1.2 s "OS-XTC" 1.3.6.1.4.1.9.9.41.1.2.3.1.3 i 6 1.3.6.1.4.1.9.9.41.1.2.3.1.4 s PCE_PEER_STATE_CHANGE 1.3.6.1.4.1.9.9.41.1.2.3.1.5 s "PCEP Peer x.x.x.x state changed to Up" 1.3.6.1.4.1.9.9.41.1.2.3.1.6 t 173814422100 1.3.6.1.6.3.18.1.3.0 a <ip>
Note: Replace <ss> and <ip> with the IP address of the SpectroServer and the IP address of the device respectively.