Hello
i have created with scheduler this script for verify if fail one of ftth
/system scheduler
add comment="This will run after 4 mins" interval=5m name=ISP1 on-event="/system scheduler set [find name=checker] disabled=yes\r\
\n:local pinged [/ping address=8.8.8.8 count=5 interface=ISP1 size=50]\r\
\n:if ((\$pinged=0)) do={\r\
\n#send email\r\
\n/tool e-mail send subject=(\"Fibra ISP1 caida\") \\\r\
\nbody=(\"LA LINEA ISP1 ESTA CAIDA DESDE \" . [/system clock get time]) \\\r\
\nto=(\"tecnico@\")\r\
\n/system scheduler set [find name=backupwan] disabled=no\r\
\n}\r\
\n" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=jun/21/2019 start-time=17:31:44
add comment="This will run after 4 mins" interval=5m name=ISP2 on-event="/system scheduler set [find name=checker] disabled=yes\r\
\n:local pinged [/ping address=8.8.8.8 count=5 interface=ISP2 size=50]\r\
\n:if ((\$pinged=0)) do={\r\
\n#send email\r\
\n/tool e-mail send subject=(\" Fibra ISP2 caida\") \\\r\
\nbody=(\"LA LINEA ISP2 ESTA CAIDA DESDE \" . [/system clock get time]) \\\r\
\nto=(\"tecnico@\")\r\
\n/system scheduler set [find name=backupwan] disabled=no\r\
\n}\r\
\n" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=jun/21/2019 start-time=20:21:53
the problem is that this makes every 5 minutes send us an email with the notice that the line is down
I have installed a netwatch in another client to control a site2site that, if it fails, warns us, works well and I would like to change the scheduler, but I can not find or do not think of how to check that a fiber has fallen (put the IP of the GW not it serves me, since it could fail only the fiber and the gw respond)
Does anyone have experience in how to solve this or do I maintain the scheduler?
the control of the vpn s2s with netwach
/tool netwatch
add comment="CONTROL VPN S2S" down-script="/tool e-mail send subject=(\"ALERT\
A: VPN S2S caida\") \\\r\
\nbody=(\"LA VPN S2S ESTA CAIDA DESDE \" . [/system clock get time])\
\_\\\r\
\nto=(\"tecnico@\")" host=192.168.200.1 up-script="/tool e-mail sen\
d subject=(\"ALERTA: VPN S2S activa\") \\\r\
\nbody=(\"LA VPN S2S ESTA ACTIVA DE NUEVO DESDE \" . [/system clock \
get time]) \\\r\
\nto=(\"tecnico@\")"