Embedded syslog manager and TCL scripting

Unanswered Question
Nov 24th, 2009
User Badges:


I'm a newbie to TCL scripting and I'm doing some tests with ESM and TCL scripts

The final idea is  to implement a script that will send an email when an EIGRP neighbor changes takes place. For the moment I'm just beginning and I already have an issue

I tried to implement the following:

if { [string length $::orig_msg] < 5 } { puts "test2" } else { puts "bigger then  0" }

As soon as I come out of configuration mode it should put the text " bigger then 0."

When I just implement

if { [string length $::orig_msg] > 5 } { puts "test2" }

I get the output "test2"

As soon as I add the else statement  it doesn't do anything anymore. I suspect that there is a syntax error  but I can't find it

Can anybody help me ?



  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Joe Clarke Tue, 11/24/2009 - 08:55
User Badges:
  • Cisco Employee,
  • Hall of Fame,

    Founding Member

There is no Tcl syntax error per se, but using puts with ESM can be unpredictable.  Try using return instead to return a new syslog message:

if { [string length $::orig_msg] < 5 } {

     return "test2"

} else {

     return "bigger than 0"



This Discussion