E-mail when failover change route

Hello,

i have two wan with failover. One isp has a static gateway (sfp-Wan), the other is in dhcp (LTE-Wan)

The failover work well (Default route distance 1 for sfp-Wan and 2 for LTE-Wan)

The gateway 8x.xxx.xxx.254 not responding to ping

i have a recursive gateway which ping 4.2.2.1 for sfp-wan connection

Flags: D - DYNAMIC; A - ACTIVE; c, s, d, y - COPY
Columns: DST-ADDRESS, GATEWAY, DISTANCE

DST-ADDRESS GATEWAY DISTANCE

D d 0.0.0.0/0 14.123.4.176 2
0 As 0.0.0.0/0 4.2.2.1 1
;;; Check Free sfp-Wan
1 As 4.2.2.1/32 8x.xxx.xxx.254 1
DAc 14.123.4.176/29 LTE-Wan 0 # “dhcp”
DAc 8x.xxx.xxx.0/24 sfp-Wan 0 # “static”
DAc 192.168.6.0/24 bridgeLan 0

it will be nice to have a warning like an e-mail when the isp change.

I try netwach with 4.2.2.1 as target but obviously the status for sfp-wan stays always up, even when i unplug the interface (the ping (netwatch) work throught LTE-Wan i think)

i try too to have a notification by system/logging when the route change, but for a change (link sfp-Wan down and up) i receive 57 mails…and the topics (in logs) is the same for the 57 ( /route,debug,calc)

so i can’t filter the logs.

Has anyone an idea for my case ?

thanks for your time

Well,

finally i just add a firewall rules which block icmp to 4.2.2.1 for LTE-Wan so now netwatch goes down when sfp-Wan is out.

So now i just have to send mail via netwatch when 4.2.2.1 is up or down