cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
896
Views
3
Helpful
2
Replies

Sending syslog message with TCL, setting severity level?

Seth Beauchamp
Level 1
Level 1

I have a tcl script running on my routers that looks for discrepencies between interfaces configured with ISIS and actual UP neighbors on those interfaces. I am trying to send a syslog message for each interface that is configured to run ISIS but has no UP neighbor. All of this almost works fine, except the syslog seems to be coming out as a debug severity, the problem is that our production routers is set to logging informational. Is there any way to set the severity on these log messages? I am basically doing the log like this:

set fd [open "syslog:" "w"]

puts $fd "%HA_EM-5-LOG: ISIS: Neighbor DOWN on interface $int to $INT_DESCR"

2 Replies 2

Dan Frey
Cisco Employee
Cisco Employee

Try the "send log" CLI syntax from your TCL script to set the severity.

MPLS(tcl)#send log facility HA_EM severity 5 mnemonics LOG Neighbor DOWN on interface $int to $INT_DESCR
MPLS(tcl)#
*Apr 19 12:21:34.939: %HA_EM-5-LOG: Message from tty0(user id: admin): Neighbor DOWN on interface GigabitEthernet1 to my test Interface

 

This is definitely a good alternative and does work. I was hoping to find a way to to have a cleaner message, since this adds the "Message from tty0(user id: admin)" that I dont think i can get rid of. This might be the only solution though. Thanks!

Review Cisco Networking for a $25 gift card