Community discussions

MikroTik App
 
bigsrlcuneo
just joined
Topic Author
Posts: 9
Joined: Mon Sep 11, 2023 5:58 pm

Netwatch and schedule

Mon Sep 18, 2023 6:32 pm

Hi everyone
We setted multiple netwatch on some hosts on our mikrotik device
It should be used to watchdog our devices around the world; our intention is to be informed when a device lost internet connection, so we setted up a simple type, this is the configuration (we check the connestion in a wireguard peer):
Image
The issue is that the routerboard that made the check reboot itself every day in the night so each reconnection we receive notification that host is going online when it restart
Our intention was to disable the netwatch before the reboot and then re-enable it after the reboot, but evey time a netwatch is disabled then re-enabled it check the host and send notification that host is online

There is a good way to configure a scenario like our needing avoiding this problem?
Thanks
bye
 
User avatar
eworm
Forum Guru
Forum Guru
Posts: 1092
Joined: Wed Oct 22, 2014 9:23 am
Location: Oberhausen, Germany
Contact:

Re: Netwatch and schedule

Tue Sep 19, 2023 1:15 am

You can use my script, it does what you want, and a lot more:
Notify on host up and down
 
bigsrlcuneo
just joined
Topic Author
Posts: 9
Joined: Mon Sep 11, 2023 5:58 pm

Re: Netwatch and schedule

Tue Sep 19, 2023 4:45 pm

Oh, thanks I've installed it, configured etc and seems good for us

thanks
bye bye
 
bigsrlcuneo
just joined
Topic Author
Posts: 9
Joined: Mon Sep 11, 2023 5:58 pm

Re: Netwatch and schedule

Thu Sep 28, 2023 12:30 pm

Sorry, one last question: there is a way to customize the email destination for each netwatch or can only use the address configured in the configuration file?
Because we have several host, managed by different person and I wuold send an email to the assigned technician

Is there a way?

Thanks
bye
 
User avatar
eworm
Forum Guru
Forum Guru
Posts: 1092
Joined: Wed Oct 22, 2014 9:23 am
Location: Oberhausen, Germany
Contact:

Re: Netwatch and schedule

Fri Sep 29, 2023 3:01 pm

Currently this is not possible, no... You can give different notification settings for every script, but not for different configuration entities consumed by one scripts.

Though I see the use here... Perhaps I should extend that. 🤔
 
User avatar
eworm
Forum Guru
Forum Guru
Posts: 1092
Joined: Wed Oct 22, 2014 9:23 am
Location: Oberhausen, Germany
Contact:

Re: Netwatch and schedule

Fri Sep 29, 2023 3:21 pm

Let's give it a try... This is required to install the script from next branch:
/system/script/set comment="url-suffix=?h=next" netwatch-notify;
$ScriptInstallUpdate;
See the commit message for details on how to use the new setting:
https://git.eworm.de/cgit/routeros-scri ... 8326512913
Last edited by eworm on Sun Oct 08, 2023 12:30 am, edited 1 time in total.
 
bigsrlcuneo
just joined
Topic Author
Posts: 9
Joined: Mon Sep 11, 2023 5:58 pm

Re: Netwatch and schedule

Fri Oct 06, 2023 4:15 pm

Hi

Thank you so much! I've already updated, configured and all works great!
this is an important features for us, so, thank you!

bye bye
 
User avatar
eworm
Forum Guru
Forum Guru
Posts: 1092
Joined: Wed Oct 22, 2014 9:23 am
Location: Oberhausen, Germany
Contact:

Re: Netwatch and schedule

Sun Oct 08, 2023 12:29 am

The change is now merged into the main branch, so you can remove the comment from script:
/system/script/set comment="" netwatch-notify;
(Sounds like this is a big win for you, especially after I made the change for you. So please consider keeping my motivation up...)

Who is online

Users browsing this forum: perrb, starcake and 94 guests