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

EEM-tcl trigger using customized syslog not working.

soachar
Level 1
Level 1

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 2

rosaho
Level 3
Level 3

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

Joe Clarke
Cisco Employee
Cisco Employee

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

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: