From fcc0d1551a0da553fc2a64cd67bd867a23b00659 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 5 Jul 2021 14:56:51 +0200 Subject: [PATCH] doc/netwatch-notify: hint on checking specific isp --- doc/netwatch-notify.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/doc/netwatch-notify.md b/doc/netwatch-notify.md index 7f61d88..199f050 100644 --- a/doc/netwatch-notify.md +++ b/doc/netwatch-notify.md @@ -94,6 +94,23 @@ A target like this suits well to be parent for other checks. / tool netwatch add comment="notify, hostname=example.com, parent=internet" host=93.184.216.34; +### Checking specific ISP + +Having several ISPs for redundancy a failed link may go unnoticed without +proper monitoring. You can use routing-mark to monitor specific connections. +Create a route and firewall mangle rule. + + / ip route add distance=1 gateway=isp1 routing-mark=via-isp1; + / ip firewall mangle add action=mark-routing chain=output new-routing-mark=via-isp1 dst-address=1.0.0.1 passthrough=yes; + +Finally monitor the address with `netwatch-notify`. + + / tool netwatch add comment="notify, hostname=quad-one via isp1" host=1.0.0.1; + +Note that *all* traffic to the given address is routed that way. In case of +link failure this address is not available, so use something reliable but +non-essential. In this example the address `1.0.0.1` is used, the same service +(Cloudflare DNS) is available at `1.1.1.1`. --- [◀ Go back to main README](../README.md) [▲ Go back to top](#top)