cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1329
Views
0
Helpful
3
Replies

EEM to send mail when interface load is high

Cisco Freak
Enthusiast
Enthusiast

Hello,

I created the below script to send an email when the interface load is higher than 15.

event manager applet Load
event interface name Gi0/0 parameter txload entry-op gt entry-val 15 entry-type value poll-interval 30
action 4.0 mail server x.x.x.x to admin@domain.com from alert@domain.com subject "High traffic"

But this is not working.

Router#sh int gi0/0 | i load
reliability 255/255, txload 18/255, rxload 1/255


Router#sh int gi0/0 | i load
reliability 255/255, txload 18/255, rxload 1/255

Router#sh event manager history events detailed
No. Job Id Proc Status Time of Event Event Type Name

10 46 Actv abort Wed Jan20 14:08:26 2016 interface applet: Load
name GigabitEthernet0/0 parameter txload is_increment FALSE value 18 delta_val 0 exit_event 0

Any help would be appreciated.

CF

3 Replies 3

Joe Clarke
Cisco Employee
Cisco Employee

Your mail relay is likely not accepting emails from your device.  You can enable "debug event manager action mail" to confirm.

I am wondering why its showing value as 'FALSE' even though the load is higher than 15.

10 46 Actv abort Wed Jan20 14:08:26 2016 interface applet: Load
name GigabitEthernet0/0 parameter txload is_increment FALSE value 18 delta_val 0 exit_event 0

Emmanuel Valdez
Participant
Participant

Hello friend,

The first step is to check the EEM version, if you have have an ISR G2 with the last IOS version, the EEM is 4.0, your applet will be the following:

First set the email parameters, in this case those settings are to accept authenticated emails.

event manager environment _email_to myusername@mydomain.com
event manager environment _email_server username-to-authenticate:Password-user@server-ip-address-or-FQDN
event manager environment _email_from alertuser@mydomain.com 

Then set EEM applet:

event manager applet Interface_Load
event tag 1 interface name GigabitEthernet0/0 parameter txload entry-op gt entry-val 15 entry-type value poll-interval 30
action 1.5 mail server "$_email_server" to "$_email_to" from "$_email_from" subject "High traffic"

Regards.

Please rate usefull answers.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: