Link to home
Start Free TrialLog in
Avatar of cpatte7372
cpatte7372Flag for United Kingdom of Great Britain and Northern Ireland

asked on

EEM (Tcl) Script for an Event Help

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
Avatar of cpatte7372
cpatte7372
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of ArneLovius
ArneLovius
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Cheers