cannot trigger a test EEM script with a test syslog message
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2018 04:48 AM - edited 03-05-2019 10:19 AM
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
- Labels:
-
Other Routing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2018 01:05 AM
Any tip ?
I don't understand why the applet zscaler2 is not triggered by the syslog messagesent by the applet
test_zscaler2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2018 04:48 AM
I found how: send log 5 blabla
Solved
Gilles
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2018 06:58 AM
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 ?
