12-27-2019 07:13 PM
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,
12-28-2019 01:23 AM
Hello,
can you post the script ? Are you getting the emails every minute because the script is running every minute ?
12-28-2019 05:12 AM
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.
12-28-2019 06:21 AM - edited 12-28-2019 06:22 AM
@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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide