cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1300
Views
0
Helpful
1
Replies

Problem with Track not being recognized by EEM (Event Manager Applet), not showing as "Tracked By"

dblagbro
Level 1
Level 1

So when I run "show track 2", nothing shows up as "Tracked By" even though it's the trigger for an EEM Applet, but my "show track 1" shows that it is being tracked by static routes.

 

 

I can see that the EEM App is not triggering / running (using it to send an email).  It worked once upon a time, but I noticed I stopped getting emails over the last couple months but not sure exactly when.

 

 

Key pieces of "show run":

!

track 2 ip sla 2

delay down 5

!

::::

!

ip sla 2

icmp-echo 24.XXX.XXX.1 source-interface GigabitEthernet0/0

threshold 500

timeout 1000

frequency 1

ip sla schedule 2 life forever start-time now

!

::::

!

event manager environment _email_to XXXXX@gmail.com

event manager environment _syslog_msg

event manager environment _email_from XXXXX@earthlink.net

event manager environment _email_server :XXXXX@smtpauth.earthlink.net 587

event manager applet ISP_change

event track 2 state any

action 0.5 cli command "enable"

action 1.0 cli command "clear ip nat trans *"

action 1.5 wait 10

action 2.0 mail server "$_email_from$_email_server" to "$_email_to" from "$_email_from" subject "On SAT / Cable Down Change - $_event_pub_time" body "Event ID: $_event_type /// Cable is now: $_track_state." source- interface GigabitEthernet0/1

action 2.5 end

!

end

(EOF)

I am using 2 tracks, one for IP routing and this track 2 for notifications....

Now when I run, show track 1, I get the "Tracked By" - as it should be but for this track 2, I get nothing:

router#

router#show track 2

Track 2

IP SLA 2 state

State is Up

2 changes, last change 16:16:27

Delay down 5 secs

Latest operation return code: OK

Latest RTT (millisecs) 8

router#

router#

I am not sure why my "show track 2" isn't showing the applet that should be tracking it. Any guidance appreciated... I've tried newer code - it's a C3945 with latest MR software on it but happened with some older IOS too.

 

Following someone else's suggestion I ran "show event manager history events" which returns nothing (I presume implying it's not been run - but it's also not in my logging and running "debug event manager all" doesn't show anything about this event applet either).

1 Accepted Solution

Accepted Solutions

dblagbro
Level 1
Level 1

So someone was able to point out the issue:

 

The EEM applet / script was not compiling properly because their was an "action outside of conditional block."

In other words, this line " action 2.5 end" was not relevant, prevented the compilation so therefore the script was invalid and therefore "track 2" was not actually being tracked.

Removing that line, existing the script context and writing-mem caused it to start working.

 

View solution in original post

1 Reply 1

dblagbro
Level 1
Level 1

So someone was able to point out the issue:

 

The EEM applet / script was not compiling properly because their was an "action outside of conditional block."

In other words, this line " action 2.5 end" was not relevant, prevented the compilation so therefore the script was invalid and therefore "track 2" was not actually being tracked.

Removing that line, existing the script context and writing-mem caused it to start working.

 

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: