04-18-2023 12:35 PM
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"
04-19-2023 05:23 AM
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
04-20-2023 05:52 AM
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!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide