Re: EEM script to send email when temperature reach critical

From: Lindsay Hill <lindsay.k.hill_at_gmail.com>
Date: Tue, 7 Aug 2012 14:42:34 +1200

Why not set up a proper NMS that will pick up things like this, and send an email if required?

Configuring an EEM applet for every possible Bad Thing that might happen on a router is very time-consuming, and not that reliable or flexible. If you set up a proper NMS, you can pick up on all kinds of error conditions (e.g. power supply failure, fan failure, etc) rather than just one. You then have much more flexibility in what you do with those alerts (hint: sending people an email for every single error, all the time, is not usually what you want to do).

But if you must, a rough stab at an EEM script would be something like this:

event manager applet TEMPALERT

event syslog pattern ".*ENVMON.*OVERTEMP.*"
action 1.0 cli command "enable"
action 2.0 cli command "show environment temperature"
action 3.0 mail server 1.2.3.4 to operations_at_mycompany.com from router_at_mycompany.com subject "Router temperature alert" body "$_cli_result"

Note that this has not been tested AT ALL. You'll want to check that syslog pattern. You could probably also use EEM to check the temperature SNMP OIDs, but again, that's better done from an NMS.

 - Lindsay

On 4/08/2012, at 3:49 PM, Mathew <mathewfer_at_gmail.com> wrote:

> Hi
>
> Can anybody share a EEM script to send a warnning email (on IOS 15.0 or
> higher) when router temperature reaches critical value?
>
> My current syslogging setup does not have smtp enable to emails on sylog
> alerts but router has the ability to reach smtp server so I am thinking it
> is faster to send directly from router iOS so operators (on call staff) can
> take action.
>
> Thanks if someone provide some links or share a working emm script.
>
> Hope I can find one here.
>
> Regards,
>
> Mathew
>
>
> --
> Thanks
>
> Mathew
>
>
> 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 Tue Aug 07 2012 - 14:42:34 ART

This archive was generated by hypermail 2.2.0 : Sat Sep 01 2012 - 08:41:18 ART