Study has been going well, I have put in a tonne of time since starting back after Christmas am spending these 2 weeks just practicing lots of config and troubleshooting labs from my workbooks , as well as brushing up on things I knew I was week on like EEM and OER for example. I actually had a look at your blog and read over some of your posts for the OER :) Hopefully it will be enough that I can at least give the lab my best shot, and if I fail then hopefully I will have still come close enough that I won't be too discouraged from trying again.
Anyway, enjoy the 2 weeks, I hope that it will be the difference to get you across the line and I'll get in touch next week to discuss my lab.
Gavin
> From: rpcapps@hotmail.com
> To: gavdbyrne@hotmail.com
> Date: Wed, 22 Feb 2012 07:06:44 +0000
> Subject: Re: Question about EEM
>
> Hi gavin
>
> Things going well thanks. In mk at winnet on 3rd day of 12 day bootcamp. It is a chance to go through things at slower pace.
>
> I have spent quite a bit of time on eem and your solution looks good to me(that said we haven't covered eem yet on bootcamp) My thoughts were to set term length as well. If I have any other suggestions b4 end of week I will email.
>
> Hope your 2 weeks study is going well and the very best for monday.
>
> Regards
> Richard
> Sent from my BlackBerry smartphone from Virgin Media
>
> -----Original Message-----
> From: Gavin Byrne
> Date: Tue, 21 Feb 2012 23:22:44
> To:
> Subject: Question about EEM
>
> Hey Richard, how are things going? Quick question for you, did you ever try work out the EEM question that was on one of the 2 sample labs we did during the bootcamp in December, I am able to figure out most of it so far but just can't work out how to meet the requirement to only send the first 10 lines of the show processes cpu sorted 5min command. The only thing I could think of was to set the length to 10 in the console line settings? Any ideas?
>
> This is what I have so far anyway...
>
event tag 1.0 snmp oid cpmCPUTotal5min get-type exact entry-op gt entry-val 60 entry-type value poll-interval 60
action 0.1 cli command "show processes cpu sorted 5min"
action 1.0 mail server "198.2.5.10" to "engineer@cisco.com" from "EEM@cisco.com" subject "CPUAlert5min" body "$_cli_result"
event manager applet CPU2
event tag 1.0 snmp oid cpmCPUTotalTable.1.5 get-type exact entry-op gt entry-val 60 entry-type value poll-interval 60
action 0.1 cli command "show processes cpu sorted 5min"
action 1.0 mail server "198.2.5.10" to "engineer@cisco.com" from "EEM@cisco.com" subject "CPUAlert5min" body "$_cli_result"
event manager applet CPU3
event tag 1.0 snmp oid 1.3.6.1.4.1.9.9.109.1.1.1.1.5 get-type exact entry-op gt entry-val 60 entry-type value poll-interval 60
action 0.1 cli command "show processes cpu sorted 5min"
action 1.0 mail server "198.2.5.10" to "engineer@cisco.com" from "EEM@cisco.com" subject "CPUAlert5min" body "$_cli_result"
> Thanks,
> Gavin
I guess this is the right solution.
event manager applet CPU5Min
event snmp oid "cpmCPUTotalTable.1.8" get-type next entry-op ge entry-val "5" poll-interval 10
action 1 cli command "enable"
action 2 cli command "terminal length 12"
action 3 cli command "show process cpu sort 5min" pattern "--More--"
action 5 mail server "198.168.1.150" to "engineer@ciso.com" from "EEM@cisco.com" subject "CPU ALert 5Min" body "$_cli_result"
to test replace action 5 by:
action 5 syslog msg "$_cli_result"
I tested this on GNS3 with syslog, can anyone test this using real smtp server, if terminal length should be 12 or 10?
event snmp oid cpmCPUTotal5minRev get-type exact entry-op ge entry-val "60" entry-type value poll-interval 60
action 1.0 cli command "show processes cpu sorted 5min" pattern "--More--"
action 1.5 mail server "198.2.5.10" to "engineer@cisco.com" from "EEM@cisco.com" subject "CPUAlert5min" body "$_cli_result"
event manager applet TEST3
event none
action 0.5 cli command "terminal length 12"
!
end
event snmp oid cpmCPUTotal5minRev get-type exact entry-op ge entry-val "60" entry-type value poll-interval 60
action 0.5 cli command "terminal length 12"
action 1.0 cli command "show processes cpu sorted 5min" pattern "--More--"
action 1.5 syslog msg "$_cli_result"
action 2.0 mail server "198.12.5.10" to "engineer@cisco.com" from "EEM@cisco.com" subject "CPUAlert5min" body "$_cli_result"
No comments:
Post a Comment