cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

666
Views
0
Helpful
3
Replies
Highlighted

EEM script timer alert tunning command

hi, 

 

I have a the EEM script when our ISP fails, it will trigger the failover script and switch over the traffic, plus it sends an email alert notifying the failover occurred,

 

so it is working good, the option that I would like to know if it exist, is if I can change the time interval at which it sends the email alerts?

 

in my case, since it was down for almost more than 1 hour our local ISP, every minute, it sends the email, so its not like a spam problem, but is there any way to change the settings so may be every 15 minutes it can send the email notification?

 

the script is very simple, but efficient, as it works, 

 

I just have the environment variables set up for _email_server and _email_from and _email_to

 

but I need to know if I can modify the notification timer alert so instead of 1 minute, it can be 20 minutes for instance, is it possible? if so, which command or how can I accomplish that?

 

regards, 

Everyone's tags (2)
3 REPLIES 3
Highlighted
VIP Mentor

Re: EEM script timer alert tunning command

Hello,

 

can you post the script ? Are you getting the emails every minute because the script is running every minute ?

Highlighted
VIP Mentor

Re: EEM script timer alert tunning command

Can be tweaked based on the exiting EEM script with other condition to match. So as suggested post the EEM Script so we can suggest to tweak for your to test.

 

BB
*** Rate All Helpful Responses ***
Highlighted

Re: EEM script timer alert tunning command

@Georg Pauwen and @balaji.bandi  thanks for the follow up,

sure, this is the script,


event manager environment _email_server 192.168.10.10
event manager environment _email_from hostname@myemail.com
event manager environment _email_to myemail@myemail.com
event track 100 state down
action 1.0 syslog msg "ISP SLA FAILED"
action 2.0 mail server "$_email_server" to "$_email_to" from "$_email_from" subject "ISP Failed"
action 3.0 syslog msg "Failover Completed - Mail Sent"
!
end

!
track 56 ip sla 56 reachability
delay down 8 up 10
!
ip sla schedule 56 life forever start-time now

ip sla 56
icmp-echo 8.8.8.8 source-ip 192.168.56.100
frequency 5

CreatePlease to create content
Content for Community-Ad