Solved

EEM (Tcl) Script for an Event Help

Posted on 2013-05-18
3
484 Views
Last Modified: 2013-05-19
Hello Community,
 
Can someone please show me how to compile a EEM (Tcl) script that will be activated when a syslog event occurs. For example, I would like the script to be activated when the following syslog event occurs:
 
%OSPF-5-ADJCHG:
 
Also I would like a similar script to be activated when the following syslog event occurs:
 
 
VDC_MGR-2-VDC_BAD: vdc_mgr
VDC_MGR-2-VDC_UNGRACEFUL: vdc_mgr:
 
 
 
Cheers
0
Comment
Question by:cpatte7372
  • 2
3 Comments
 

Author Comment

by:cpatte7372
Comment Utility
OK, I tried to create a simple Tcl script from an EEM script using the tool provided on various scripting sites. However, when I issue the command send log %OSPF I should get the message 'testlog_ospf', but nothing happens.

::cisco::eem::event_register_none
::cisco::eem::event_register_syslog pattern {%OSPF}

namespace import ::cisco::eem::*
namespace import ::cisco::lib::*

array set arr_einfo [event_reqinfo]

action_syslog msg "testlog_osfp"


Any help?

Cheers
0
 
LVL 36

Accepted Solution

by:
ArneLovius earned 500 total points
Comment Utility
It's not a tcl script, but I have a basic script for restarting debugs for PPPoE on an 1812 based on a syslog message.

event manager applet DEBUG
 event syslog occurs 1 pattern "%SYS-5-RESTART"
 action 1.0 cli command "enable"
 action 2.0 cli command "debug pppoe events"
 action 3.0 cli command "debug pppoe errors"
 action 4.0 cli command "debug ip ddns update"
 action 5.0 syslog msg "Debugs Enabled"

Open in new window

0
 

Author Closing Comment

by:cpatte7372
Comment Utility
Cheers
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Routing VLANs 5 44
Can 16Mbps internet speed work on this line ? 4 31
EIGRP Full Mesh 2 31
iPad Won't Connect 16 30
Hello , This is a short article on how would you go about enabling traceoptions on a Juniper router . Traceoptions are similar to Cisco debug commands but these traceoptions are implemented in Juniper networks router . The following demonstr…
Getting hacked is no longer a matter or "if you get hacked" — the 2016 cyber threat landscape is now titled "when you get hacked." When it happens — will you be proactive, or reactive?
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now