Community discussions

MikroTik App
 
User avatar
n2m
newbie
Topic Author
Posts: 47
Joined: Mon Feb 25, 2008 8:48 am

Netwatch with interface or routing table

Tue Jun 02, 2009 7:51 pm

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.
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6697
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Re: Netwatch with interface or routing table

Wed Jun 03, 2009 11:47 am

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.
 
Moc
just joined
Posts: 18
Joined: Sun Jan 06, 2013 8:47 am

Re: Netwatch with interface or routing table

Fri Jan 18, 2013 7:47 pm

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.
 
sheno
just joined
Posts: 5
Joined: Tue Aug 06, 2013 4:10 pm

Re: Netwatch with interface or routing table

Wed May 10, 2017 12:10 am

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 ,
 
User avatar
aacable
Member
Member
Posts: 435
Joined: Wed Sep 17, 2008 11:58 am
Location: ISLAMIC Republic of PAKISTAN
Contact:

Re: Netwatch with interface or routing table

Wed May 10, 2017 6:24 am

customized results requires customized solution :)
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/1 ... -approach/
 
sheno
just joined
Posts: 5
Joined: Tue Aug 06, 2013 4:10 pm

Re: Netwatch with interface or routing table

Thu May 11, 2017 2:35 pm

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