cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
967
Views
0
Helpful
7
Replies

IP SLA Email generation for up and down using EEM

kshenk
Level 1
Level 1

I currently have the following configuration for IP SLA and EEM notifications.

track 1 ip sla 10 reachability
 delay down 90 up 90

ip sla 10
 icmp-echo 172.20.1.9 source-interface GigabitEthernet0/0/1
 frequency 5
 history distributions-of-statistics-kept 2
 history buckets-kept 60
 history enhanced interval 10 buckets 10
ip sla schedule 10 life forever start-time now
ip sla reaction-configuration 10 react timeout threshold-type immediate
ip sla logging traps
ip sla enable reaction-alerts

event manager environment _email_server 1.1.1.1
event manager environment _email_from JOE@
event manager environment _email_to SUZY@
event manager applet ISPCHECK
 action 1.0 if $_ipsla_condition eq "Occurred"
 action 1.1  syslog msg "Primary Internet Circuit Down"
 action 1.2  mail server "1.1.1.1" to "SUZY@" from "JOE@" 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 "10.0.0.12" to "it@cleburne.net" from "pdalerts@cleburne.net" subject "Circuit Up" body "Primary Internet Circuit Up."
 action 1.6 end

 

The issue is I cannot enter the command for

event ipsla operation-id 10 reaction-type timeout (IT IS NOT AVAILABLE)

 

I get this in logging history

entry number 160 : HA_EM-4-FMPD_NO_EVENT
    No event configured for applet ISPCHECK

Is there a different command I need to use or is the configuration incorrect?

 

Thanks

 

 

 

1 Accepted Solution

Accepted Solutions

it will appear when event occur. The when track move state from up to down or down to up.. :)
Jaderson Pessoa
*** Rate All Helpful Responses ***

View solution in original post

7 Replies 7

Jaderson Pessoa
VIP Alumni
VIP Alumni

@kshenk Hello,

 

this can help you better.

 

 

R1(config)# event manager applet ISPCHECK
R1(config-applet)# event track 1 state down
R1(config-applet)# action 1.0 syslog msg "Primary Internet Circuit Down"
R1(config-applet)# action 1.2 mail server "1.1.1.1" to "SUZY@" from "JOE@" subject "Circuit Down" body "Primary Internet Circuit Down." from "eem@lab-exam.net" subject "User-Issue" body "$_cli_result"
R1(config-applet)# event track 1 state up
R1(config-applet)# action 1.3 syslog msg "Primary Internet Circuit UP"
R1(config-applet)# action 1.4 mail server "10.0.0.12" to "it@cleburne.net" from "pdalerts@cleburne.net" subject "Circuit Up" body "Primary Internet Circuit Up."
R1(config-applet)# action 1.5 end

Jaderson Pessoa
*** Rate All Helpful Responses ***

Thanks Jaderson,

I actually was in process of trying that and just finished the script when I do Show track 1 it doesn't look like it is being tracked by the ISPCHECK.  Config below, am I still missing something or does something else have to happen?

 

event manager environment _email_server 1.1.1.1
event manager environment _email_from Alert@
event manager environment _email_to it@
event manager applet ISPCHECK
 action 1.0  syslog msg "Primary Internet Circuit Down"
 action 1.1  mail server "1.1.1.1" to "it@" from "alert@" subject "Circuit Down" body "Primary Internet Circuit Down."
 action 1.2 else
 action 1.3  syslog msg "Primary Internet Circuit UP"
 action 1.4  mail server "1.1.1.1" to "it@" from "alert@" subject "Circuit Up" body "Primary Internet Circuit Up."
 action 1.5 end

 

CLEBURNEVPN#show track 1
Track 1
  IP SLA 10 reachability
  Reachability is Up
    4416 changes, last change 14:59:25
  Delay up 90 secs, down 90 secs
  Latest operation return code: OK
  Latest RTT (millisecs) 9
  Tracked by:
    Static IP Routing 0

@kshenk Hello,

 

I cant see your event track.

 

 action 1.0  syslog msg "Primary Internet Circuit Down"

event track 1 state down
 action 1.1  mail server "1.1.1.1" to "it@" from "alert@" subject "Circuit Down" body "Primary Internet Circuit Down."
event track 1 state up
 action 1.3  syslog msg "Primary Internet Circuit UP"
 action 1.4  mail server "1.1.1.1" to "it@" from "alert@" subject "Circuit Up" body "Primary Internet Circuit Up."
 action 1.5 end

 

Jaderson Pessoa
*** Rate All Helpful Responses ***

Also wanted to mention the IP SLA works just fine has been for a while.  Thanks

Great,

you can also divide them.

R1(config)# event manager applet ISPCHECK_DOWN
R1(config-applet)# event track 1 state down
R1(config-applet)# action 1.1 syslog msg "Primary Internet Circuit Down"
R1(config-applet)# action 1.2 mail server "1.1.1.1" to "SUZY@" from "JOE@" subject "Circuit Down" body "Primary Internet Circuit Down." from "eem@lab-exam.net" subject "User-Issue" body "$_cli_result"
R1(config-applet)# action 1.3 end


R1(config)# event manager applet ISPCHECK_UP
R1(config-applet)# event track 1 state up
R1(config-applet)# action 1.1 syslog msg "Primary Internet Circuit UP"
R1(config-applet)# action 1.2 mail server "10.0.0.12" to "it@cleburne.net" from "pdalerts@cleburne.net" subject "Circuit Up" body "Primary Internet Circuit Up."
R1(config-applet)# action 1.3 end

If possible mark as solved and helpful.

Regards,
Jaderson Pessoa
*** Rate All Helpful Responses ***

Had to remove end action, I will have to see if this works in testing still don't understand why the show track 1 doesn't show the eem as what it is tracked by.

 

Thanks Reply and I will accept as answer.

it will appear when event occur. The when track move state from up to down or down to up.. :)
Jaderson Pessoa
*** Rate All Helpful Responses ***