cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
7304
Views
0
Helpful
23
Replies

EEM Email setup for IP SLA

howithink
Beginner
Beginner

Hi,

I have setup an IP SLA on my cisco 3850 switch internally. Everything is working great! What i need to know is how can i setup an Embedded Event Manager (EEM) email alert on my 3850 so when the IP SLA does occur i want an email triggered informing me. Same goes for when IP SLA returns back to primary route.

Your help is appreciated immensely.

Saif

2 Accepted Solutions

Accepted Solutions

Joe Clarke
Hall of Fame Cisco Employee Hall of Fame Cisco Employee
Hall of Fame Cisco Employee

You can use the IP SLA detector.  You have to configure your IP SLA collector to have a reaction-config.  Assuming it's a timeout you want, you would configure the reaction-config to be for a timeout, then your EEM event will be:

event ipsla reaction-type timeout operation-id X

Where X is the IP SLA collector ID.  Then, within your applet, you'll need an if statement:

action 1.0 if $_ipsla_condition eq Occurred

action 1.1  syslog msg "Primary Internet Circuit Down"

action 1.2  mail server "$_email_server" to "$_email_to" from "$_email_from" subject "Circuit Down" body "Primary Internet Circuit Down."

action 1.3 else

action 1.4  syslog msg "Primary Internet Circuit UP"

action 1.5  mail server "$_email_server" to "$_email_to" from "$_email_from" subject "Circuit UP" body "Primary Internet Circuit UP."

action 1.6 end

This means you only need one applet.

View solution in original post

Joe Clarke
Hall of Fame Cisco Employee Hall of Fame Cisco Employee
Hall of Fame Cisco Employee

You're missing:

event manager applet ISPCheck

event ipsla reaction-type timeout operation-id 1

View solution in original post

23 Replies 23

Bilal Nawaz
Engager
Engager

I think there is a dedicated section for EEM scripting, you will probably get better and more beneficial answers by moving your post from the right hand side of your post in the Actions section.

Please rate useful posts & remember to mark any solved questions as answered. Thank you.

Please rate useful posts & remember to mark any solved questions as answered. Thank you.

Thank you. i have moved this discussion to EEM scripting.

howithink
Beginner
Beginner

OK i did some research and found the following script someone used.

event manager environment _email_server 192.168.1.10
event manager environment _email_from alerts@domain.local
event manager environment _email_to oncall@domain.local

event manager applet internet_down
event track 1 state down
action 1.0 syslog msg "Primary Internet Circuit Down"
action 1.1 mail server "$_email_server" to "$_email_to" from "$_email_from" subject "Circuit Down" body "Primary Internet Circuit Down."

event manager applet internet_UP
event track 1 state up
action 2.0 syslog msg "Primary Internet Circuit UP"
action 2.1 mail server "$_email_server" to "$_email_to" from "$_email_from" subject "Circuit UP" body "Primary Internet Circuit UP."

Will this work on a 3850? Because the 3850 uses IOS-XE and a lot of the commands are different. I am afraid to try anything on my live network.

thanks,

Saif