cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
725
Views
0
Helpful
3
Replies

cannot trigger a test EEM script with a test syslog message

I have written a test EEM script zscaler2  which is supposed to create a EEM script zscaler3 when triggered.The trigger is a syslog message. I want to test my script before it becomes live. So I need to have a syslog message.

I expect : %TRACK-6-STATE: 178 list boolean and Up -> Down

So, I have created another EEM script test_zscaler2 to write a syslog message.

event manager applet test_zscaler2
event none
action 1 syslog msg "%TRACK-6-STATE: 178 list boolean and Up -> Down"
!
end

When I run the applet test_zscaler2, I can see in the cisco log :

Apr 23 10:28:42.785: %HA_EM-4-LOG: test_zscaler2: %TRACK-6-STATE: 178 list boolean and Up -> Down

but the script zscaler2 is not triggered.

Here is my script zscaler2 :

event manager environment q "
event manager applet zscaler2 event tag down syslog pattern "%TRACK-6-STATE: 178 list boolean and Up -> Down" event tag un syslog pattern "list boolean and Up -> Down" event tag up syslog pattern "%TRACK-6-STATE: 178 list boolean and Down -> Up" trigger correlate event un or event up or event down action 100 regexp " Up -> Down" "$_syslog_msg" id action 100.1 syslog msg "$_syslog_msg" action 100.2 syslog msg "$id" action 100.3 if $id eq Up -> Down action 101 wait 5 action 102 cli command "enable" action 103 cli command "config t" action 104 cli command "event manager applet zscaler3" action 105 cli command "event timer countdown time 60" action 106 cli command "action 1.0 cli command enable" action 107 cli command "action 2.0 cli command $q config t$q" action 108 cli command "action 3.0 snmp-trap strdata $q ZScaler Trap : No internet connectivity $q" action 109 cli command "action 5.0 cli command $q no event manager applet zscaler3$q" action 110 cli command "action 6.0 cli command end" action 111 end

Any idea how to add the needed syslog message to trigger my script ?

Thanks

Regards,

Gilles 

 

3 Replies 3

Any tip ?

I don't understand why the applet zscaler2 is not triggered by the syslog messagesent by the applet 

test_zscaler2

 

I found how: send log 5 blabla

Solved

Gilles

Hello,

 

I could not get your script to work, I think the problem is that the HA facility is not a syslog.

 

How exactly did you solve this ?

Review Cisco Networking for a $25 gift card