Netwatch with interface or routing table

I couldn’t find no topic regarding this issue. How can i monitor if one gateway is down with netwatch, because netwatch pings from the main routing table, its not able to check specific gateway, by interface or routing table.

Thanks.

Netwatch should ping/monitor gateway correctly.

The problem might be, when gateway is still reachable (by ping), but after the gateway nothing works.
Add one /ip route, which will monitor one destination (for example specific web-page),
/ip route add dst-network=x.x.x.x/xx gateway=you_need_to_monitor
Add address from dst-network=x.x.x.x to netwatch.

I understand the idea of setting a static route for a destination, but that wont work if it a pppoe connection for example that the routing will mark as unreachable and then will go via the standard route.

I think an additional fields in netwatch would be useful to select the interface / IP source we want to use for the ping.

As a second note, it would be nice to have the distance fields in a pppoe connection for the default route like we have for dhcp client.

is there any progress yet dears
i knew its old post and now its 2017

the senario is Three wan both are working together based on BandWidth Load balance
So the Three line are working
i need log or email in case ping 8.8.8.8 fail from any certain wan so its mean that WAN has a problem
so i got an email and take an action.
And now Netwatch didnt contain a source interface to check so by default it will send from any and that is what i dont want
i need to make a THree check one for every line.
---------------- WAN1
Lan ---------------------------------- Mikrotik ---------------- WAN2
---------------- WAN3


thanks ,

customized results requires customized solution :slight_smile:
Stop using netwatch.
instead go with script method. it has utmost power and you can get about any result you want.
If you have 3 wan links, then you should have at least 2 monitoring host (e.g 8.8.8.8 or 1.2.3.4 likewise) per wan to monitor.
means create static route for each monitoring host going via specific wan link. also its better to create Blackhole route for them as well to make sure no matter what happen ping to that host goes via that link only.

Following is just an example for you , just to help you with designing your own one !
https://aacable.wordpress.com/2015/09/17/monitoring-multiple-wan-links-in-pcc-using-black-hole-route-approach/

Dear sayed

Should i change any thing in this script because
it didnt work
My Three interfaces name are

ISP_1
ISP_2
ISP_3

thanks dear