Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

EEM-tcl trigger using customized syslog not working.

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

2 REPLIES
New Member

This discussion has been

This discussion has been reposted from Top Contributors to the EEM Scripting community.

Cisco Employee

EEM is unable to intercept a

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

96
Views
0
Helpful
2
Replies
CreatePlease login to create content