Netwatch delay after reboot – need it to stay disabled until startup script runs

Hi,

I’m using Netwatch to monitor connectivity on LAN_A.
If the link is unavailable, a script runs that disables the interface and its IP address, and switches to LAN_B.

The problem is that after a reboot, it takes a short while for IP negotiation to complete — so it’s almost certain that Netwatch will evaluate the link as unavailable before everything is ready (please correct me if that assumption is wrong).

Now, I know that it’s possible to add a startup delay using a script and scheduler, for example:

:delay 61s
:log info "Startup delay finished. Enabling Netwatch."
/tool netwatch enable 0

But this assumes that netwatch 0 is initially disabled.
What if I already have a Netwatch entry that’s enabled by default?

So the core of my question is:
How can I make Netwatch start disabled by default after a reboot, and only enable it later via the delay script?

Putting something like this in the scheduler —

/tool netwatch set 0 disabled=yes

followed by a delay script — feels like a rat race between whether the scheduler disables Netwatch before it evaluates something itself. That just seems wrong.

Any ideas?

What version of RouterOS are you running? Ancient, I presume?

Netwatch has an initial delay, separate, specific before it starts after a boot or reboot:

startup-delay (Default: 5m) Time to wait until starting Netwatch probe after system startup

I am not sure why that won't work for you, or the RoS version you have doesn't have it?

Wow, Netwatch keeps improving everytime I look away:
It looks like they do indeed have a startup-delay ( on top of start delay ) which should answer that reboot etc type question.
They also have IGNORE initial up or down!!

start-delay (Default: 3s) Time to wait before starting probe (on add, enable, or system start)
startup-delay (Default: 5m) Time to wait until starting Netwatch probe after system startup
up-script (Default:"") Script to execute on the event of probe state change 'fail' --> 'OK'
down-script (Default:"") Script to execute on the event of probe state change 'OK' --> 'fail'
test-script (Default:"") Script to execute at the end of every probe test
ignore-initial-up (no yes ; Default*:* no) Specifies if "Up" script should be ran if probe state change goes from Unknown to 'Up', used to help against false positives after enabling the probe, or after a reboot. "no" means that change from Unknown to Up will not be ignored.
ignore-initial-down (no yes; Default: no) Specifies if "Down" script should be ran if probe state change goes from Unknown to 'Down'. "no" means that change from 'Unknown' to 'Down' will not be ignored.

Should be used with care, as first "Down" status won't be executed, and Down script will only be ran if probe goes through "Up" > "Down" state.

Yes, netwatch has improved a lot, but @Rohllik28 either does not know that or he is running some ancient RouterOS like v6 or v7.9 or some such. Let’s wait and see.