cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

Community Helping Community

340
Views
0
Helpful
1
Replies
Beginner

TCL value $arr_einfo(msg) empty

Hello i have some test tcl script for cisco router:

# script.tcl test
::cisco::eem::event_register_syslog tag 1 pattern ".*SYS-5-CONFIG_I: Configured from console.*" occurs 1 ::cisco::eem::trigger { ::cisco::eem::correlate event 1 ::cisco::eem::attribute tag 1 occurs 1 } namespace import ::cisco::eem::* namespace import ::cisco::lib::* set hostname [info hostname] array set arr_einfo [event_reqinfo] puts "Syslog message is $arr_einfo(msg)"

i call tcl script: event manager policy script.tcl

event manager directory user policy "flash:/"

in this case I have all time blank cli message: Syslog message is (without arr_einfo(msg))
Can someone help please? Thank you.

1 REPLY 1
Highlighted
Hall of Fame Cisco Employee

Re: TCL value $arr_einfo(msg) empty

This variable should not be blank.  However, it may start with a newline, which could give the impression of being blank.  Change your last line to:

puts "Syslog message is **$arr_einfo(msg)**"

And you'll see the asterisks to let you know if the variable is truly empty.

CreatePlease to create content
Content for Community-Ad
July's Community Spotlight Awards