Community discussions

MikroTik App
 
ramynet
just joined
Topic Author
Posts: 2
Joined: Tue Jan 22, 2019 10:51 am

need help with netwatch script

Sat Jan 07, 2023 12:18 pm

i have more than 400 netwatch host
and i want to edit interval to default
i use this command // set 1 timeout=3s
but still interval value not change to default
 
tomislav91
Member
Member
Posts: 303
Joined: Fri May 26, 2017 12:47 pm

Re: need help with netwatch script

Wed Jan 11, 2023 2:12 pm

i have more than 400 netwatch host
and i want to edit interval to default
i use this command // set 1 timeout=3s
but still interval value not change to default
If you are trying to change the interval of multiple netwatch hosts on a MikroTik RouterOS device, you can use the following command to set them all to the default value of 3 seconds:

/tool netwatch set [/tool netwatch find] timeout=3s
This command will find all netwatch hosts, and set the timeout value for all of them to 3 seconds.

Alternatively, you can use the following command to set the timeout value for a specific netwatch host:

/tool netwatch set [find name="hostname"] timeout=3s
In this command, "hostname" should be replaced with the actual hostname of the netwatch host for which you want to change the interval value.

It's possible that the command is working correctly but the interval is not changing to default because the netwatch host might already be down or not reachable. So, you might check the status of the netwatch host and then try to change the interval.

Additionally, you should check the documentation of Mikrotik RouterOS for any specific rules or information that may affect the netwatch host configuration.
The official MikroTik RouterOS documentation can be found at the following link:

https://wiki.mikrotik.com/wiki/Manual:Tools/Netwatch

This page provides detailed information about the netwatch tool, including how to configure it, use it and troubleshoot it. It also provides examples of how to use the tool in various scenarios and commands reference.

This documentation should be your primary resource for understanding the features and capabilities of the netwatch tool. It is also a great reference for learning about other features and tools that are available in MikroTik RouterOS.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: need help with netwatch script

Wed Jan 11, 2023 4:16 pm

Is "host", not "name" (on v6, and the user do not specify the RouterOS version, as usual)
and the default is 60s, not 3s

Correct syntax
/tool netwatch set [find] timeout=60s

/tool netwatch set [find where host="<HOST>"] timeout=60s

Who is online

Users browsing this forum: davidhirka and 19 guests