Thanks Guys- It is working by capturing entire message. Also, it seems good
idea as a programmer to output the message each time event is
successful/fail to identify the issue.
Regards,
Bilal Hansrod
On Sun, Jan 9, 2011 at 4:04 AM, Brad Edgeworth <edgie512_at_gmail.com> wrote:
> Bilal,
>
> I've found with EEM it's best to break things into sections. First I
> write a code block to verify the trigger is working, this could be something
> as simple as
>
>
> Event Manager Applet Trigger
> event syslog pattern "Line protocol on Interface FastEthernet0/0"
> action 1.0 syslog msg "Trigger Works"
>
>
> You should also turn up debugging on EEM with the "debug event manager
> detector <type>"
>
> And then do a second applet to test all your action statements used the
>
> Event Manager Applet Logic
> event none
> action 1.0 Blah Blah
>
>
> To execute use, "event manager run Logic"
>
> Once both work properly, put them together in one event.
>
> Be sure to look through both the config & command line references in the
> Doc-CD.
>
> -Brad
>
>
>
>
> On Sat, Jan 8, 2011 at 10:14 AM, Stephen Okoye <tosco12_at_yahoo.co.uk>wrote:
>
>> Hi,
>>
>> Your script is ok but it looks as if you are not capturing the entire
>> message. I think you will have to start from "%LINEPROTO-5-UPDOWN...." all
>> the way to the end
>>
>>
>>
>> Sent from my BlackBerry wireless device from MTN
>>
>> -----Original Message-----
>> From: Bilal Hansrod <bilal.hansrod_at_gmail.com>
>> Sender: nobody_at_groupstudy.com
>> Date: Sun, 9 Jan 2011 02:52:17
>> To: Cisco certification<ccielab_at_groupstudy.com>
>> Reply-To: Bilal Hansrod <bilal.hansrod_at_gmail.com>
>> Subject: OT: EEM with Applet Policy
>>
>> I am very new to EEM scripting and just read few examples on internet and
>> came with below scripts. It seems the script works sometimes. I want to
>> trap
>> line protocol message for specific interface and shutdown another
>> interface
>> permanently. The script as below, Can someone please advise me if I have
>> missed something. Out of 5-6 tests, I was successful twice! I am using
>> this
>> script on GNS3 (heads up).
>>
>> event manager applet TEST
>> event syslog pattern "Line protocol on Interface FastEthernet0/0, changed
>> state to down"
>> action 1.0 cli command "enable"
>> action 1.1 cli command "configure term"
>> action 1.2 cli command "interface FastEthernet0/1"
>> action 1.3 cli command "shutdown"
>>
>> Any suggestions.
>>
>> Regards,
>>
>> Bilal Hansrod
>>
>>
>> Blogs and organic groups at http://www.ccie.net
>>
>> _______________________________________________________________________
>> Subscription information may be found at:
>> http://www.groupstudy.com/list/CCIELab.html
>>
>>
>> Blogs and organic groups at http://www.ccie.net
>>
>> _______________________________________________________________________
>> Subscription information may be found at:
>> http://www.groupstudy.com/list/CCIELab.html
Blogs and organic groups at http://www.ccie.net
Received on Sun Jan 09 2011 - 17:45:57 ART
This archive was generated by hypermail 2.2.0 : Tue Feb 01 2011 - 07:39:17 ART