cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
958
Views
0
Helpful
2
Replies

eem 2.3 and conditions

dmitry
Level 1
Level 1

Hi,

Need some way to trigger a second policy based on the results of a first one using applets (no TCL), 90% of routers running eem 2.3 (under 12.4.20T), which does not support the conditions, what I have tried was a first applet's generated syslog: action 6.1 syslog priority informational msg "$_cli_result" (the $_cli_result would hold the result of the previous command (copy http://x.x.x.x/file running) - "Error opening http" when x.x.x.x is down) to act as a syslog trigger for the second applet (the second applet to try copy http://y.y.y.y/file running): event syslog pattern "Error opening http".

The second applet does not react, looks like the eem generated syslogs are not used as triggers

Also tried action 6.2 publish-event sub-system 12 type 11 arg1 "$_cli_result" in the first applet, however the second in its trigger does NOT have arg1 option: event application sub-system 12 type 11

Is there a way to craft it?

Thanks

2 Replies 2

Joe Clarke
Cisco Employee
Cisco Employee

First, you have EEM 2.4.  EEM 2.4 was introduced in 12.4(20)T.  EEM 2.3 was introduced in 12.4(11)T.  See

https://supportforums.cisco.com/docs/DOC-8799 on how to find your version of EEM.

Next, EEM cannot intercept syslog messages that its policies generate.  This is to prevent infinite loops.  You could, however, use the "send log" CLI command to generate a syslog message that EEM can intercept:

event manager environment quote "

!

action X cli command "send log $quote $_cli_result$quote"

The application-specific event is another good idea.  It should work like this:

event manager applet a1

...

action X publish-event arg1 "$_cli_result" sub-system 798 type 3333
!

event manager applet a2

event application sub-system 798 type 3333

action 1.0 syslog msg "Result was $_application_data1"

Thanks a lot, will give it a try

Review Cisco Networking for a $25 gift card