Solved

EEM (Tcl) Script for an Event Help

Posted on 2013-05-18
3
507 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this tutorial I will show you with short command examples how to obtain a packet footprint of all traffic flowing thru your Juniper device running ScreenOS. I do not know the exact firmware requirement, but I think the fprofile command is availab…
Problem Description:   Couple of months ago we upgraded the ADSL line at our branch office from Home to Business line. The purpose of transforming the service to have static public IP’s. We were in need for public IP’s to publish our web resour…
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…

726 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