Hi Bilal,
I agree with Carlos, I found out that with or without the entire line
it works just fine.
It may have been due to human error, especially when we forget what we
should be testing for {like having interface FastEthernet0/1
administratively shutdown while running our test} :)
I guess that suggests why it worked twice during the test.
Thanks!
James.
On 1/9/11, Carlos G Mendioroz <tron_at_huapi.ba.ar> wrote:
> Sorry,
> I fail to see where it says that "pattern" has to match the "entire
> line". Would you please show me ?
>
> -Carlos
>
> Jay McMickle @ 09/01/2011 10:19 -0300 dixit:
>> I'm new to EEM as well, but I did find a useful link that validates
>> Stephen's
>> point.
>> http://www.cisco.com/en/US/prod/collateral/iosswrel/ps6537/ps6555/ps6815/conf
>> ig_guide_eem_configuration_for_cisco_integrated_services_router_platforms.html
>>
>>
>> Regards,
>> Jay McMickle- CCNP, CCSP, CCDP, MCSE
>> http://mycciepursuit.wordpress.com/
>>
>>
>>
>>
>>
>> ________________________________
>> From: Stephen Okoye <tosco12_at_yahoo.co.uk>
>> To: Bilal Hansrod
>> <bilal.hansrod_at_gmail.com>; Cisco certification
>> <ccielab_at_groupstudy.com>
>> Sent:
>> Sat, January 8, 2011 10:14:29 AM
>> Subject: Re: OT: EEM with Applet Policy
>>
>> 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
>>
>> _______________________________________________________________________
>> Subscription information may be found at:
>> http://www.groupstudy.com/list/CCIELab.html
>>
>>
>>
>>
>>
>>
>>
>
> --
> Carlos G Mendioroz <tron_at_huapi.ba.ar> LW7 EQI Argentina
>
>
> 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 Mon Jan 10 2011 - 22:36:17 ART
This archive was generated by hypermail 2.2.0 : Tue Feb 01 2011 - 07:39:17 ART