04-07-2014 01:07 AM
I had a query with respect to eem tcl scripts.
I have to invoke a script when a customized syslog is generated, which is not working
Test1.tcl
::cisco::eem::event_register_none maxrun 100
namespace import ::cisco::eem::*
namespace import ::cisco::lib::*
action_syslog msg "Invoke call manager"
Test2.tcl
::cisco::eem::event_register_syslog pattern "\%HA_EM-6-LOG: test1.tcl: Invoke call manager"
namespace import ::cisco::eem:*
namespace import ::cisco::lib:*
action_syslog msg "Entered test2.tcl"
Debugs:
Apr 7 07:43:55.544: %HA_EM-6-LOG: test1.tcl: Invoke call manger
Apr 7 07:43:55.784: %HA_EM-6-LOG: test1.tcl: Invoke call manger
Though I am seeing the message in the log, 2nd script, test2.tcl is not getting triggered. Can anyone help me understand why this is happening?
Thanks,
Soumya
07-31-2015 06:37 PM
This discussion has been reposted from Top Contributors to the EEM Scripting community.
08-02-2015 10:12 AM
EEM is unable to intercept a message it generated. This is done to prevent infinite loops. You can use the IOS syslog: file system to test EEM policies. For tclsh:
set fd [open syslog: w]
puts $fd "%HA_EM-6-LOG: test1.tcl: Invoke call manager"
close $fd
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide