Solved

EEM (Tcl) Script for an Event Help

Posted on 2013-05-18
3
504 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
ID: 39177690
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 37

Accepted Solution

by:
ArneLovius earned 500 total points
ID: 39178601
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
ID: 39179594
Cheers
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

There are two basic ways to configure a static route for Cisco IOS devices. I've written this article to highlight a case study comparing the configuration of a static route using the next-hop IP and the configuration of a static route using an outg…
Tired of waiting for your show or movie to load?  Are buffering issues a constant problem with your internet connection?  Check this article out to see if these simple adjustments are the solution for you.
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…

829 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