Re: some help with EEM

From: Nick Matthews <matthn_at_gmail.com>
Date: Sun, 14 Feb 2010 12:23:26 -0500

I posted this script out last time, why screen scrape an IOS command
when there is an OID value?

Sample Event Manager Script to automatically collect info when the
high CPU is observed:

event manager applet capture_cpu_spike
 event snmp oid 1.3.6.1.4.1.9.2.1.56 get-type next entry-op ge
entry-val 70 exit-time 10 poll-interval 1
 action 1.0 syslog msg "CPU Utilization is high"
 action 2.0 cli command "enable"
 action 3.0 cli command "show process cpu sort | append flash:cpu.log"
 action 4.0 cli command "show clock | append flash:cpu.log"
!
event manager session cli username <username>

-nick

On Sun, Feb 14, 2010 at 11:00 AM, Jeffrey Fry <jeff_at_fryguy.net> wrote:
> You might want to check the following sites on Cisco.Com, I did a search and
> there is one for CPU monitoring already created. I would suggest looking at
> that one and from there you can get a handle on how it works.
>
> Browse and download EEM Scripts:
>
> http://forums.cisco.com/eforum/servlet/EEM;jsessionid=089F999B1C889E7F449F1797DCBA0908.SJ5B?page=search_results&fn=search&catId=0&count=20&skip=0&sortBy=3&order=DESC&mode=browse
>
> EEM Main Page:
> http://forums.cisco.com/eforum/servlet/EEM?page=main
>
> If you have access to Cisco Live Virtual there are some good presentation
> there on EEM.
>
> I have an EEM script that I use for TAC cases. Many times they want logs
> after a certain event or on a regular basis. The script that I have runs
> the commands they want and then e-mails myself and the TAC engineer the
> information. Amazing how fast they will resolve a case when they get logs
> every hour on the hour.
>
> Jeff Fry
> R&S 22061
>
>
> On Sun, Feb 14, 2010 at 10:36 AM, <Keegan.Holley_at_sungard.com> wrote:
>
>> Honestly, I read over this feature a few times until I had a basic
>> understanding of it. I'm planning to focus on the core topics and make
>> sure I know what EEM is and where it is in the doc CD for my lab.
>> Hopefully not more than a 2 point question. Ironically enough this
>> strategy works pretty well in the real world as well. Have you tried
>> looking this up on the doc CD?
>>
>>
>>
>>
>>
>> From:
>> Jomi <doctorfleming_at_gmail.com>
>> To:
>> ccielab_at_groupstudy.com
>> Date:
>> 02/14/2010 08:02 AM
>> Subject:
>> some help with EEM
>> Sent by:
>> <nobody_at_groupstudy.com>
>>
>>
>>
>> Hi guys,
>>
>> I've been trying to get deeper on EEM technology. I have a task on mind
>> that
>> is driving me crazy, since I dont know how to solve it.
>> The thing is that I want my router to send an e-mail with certain info
>> when
>> the CPU rises a value. The task is easy so far, but I dont know how to
>> include the result of the command "show proc cpu" in the body of the mail.
>> I've found some examples on the net, but they seem not to work. How can I
>> get the output of "show proc cpu" into a variable, and then print this
>> variable into an e-mail??
>>
>> Thanks in advance,
>>
>> J.M.H.
>>
>>
>> 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

Blogs and organic groups at http://www.ccie.net
Received on Sun Feb 14 2010 - 12:23:26 ART

This archive was generated by hypermail 2.2.0 : Mon Mar 01 2010 - 06:28:35 ART