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?
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.
@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 firstname.lastname@example.org
event manager environment _email_to email@example.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"
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 126.96.36.199 source-ip 192.168.56.100