Hello everyone. There are 2 similar questions.
1. If I configure a netwatch to ping a host on the network, even if mikrotik own local IP-address with the action to write to the log (for example Host online, Host offline), then immediately after rebooting microtik apparently cannot determine the availability of an IP-address (even its own) and writes to the log that the Host is offline, although in fact the host is online. Someone in the know what could be wrong?
2. To work around this problem, I tried using a script that monitors the previous availability state.
:global vdsdown
:local host 192.168.1.252
:local checkvds [/ping $host count=3]
:if (checkvds = 0) do={
:if ($vdsdown != true) do={
/log warning "Host $host is offline";
:set $vdsdown true
}
} else={
:if ($vdsdown = true) do={
/log info "Host $host is online";
:set $vdsdown false
}
}
But there is a nuance. On mikrotiK 962UiGS-5HacT2HnT, the script runs without problems, the entries in the log are one-time. On mikrotik RBLtAP-2HnD this script, if the host is not available, writes a message "Host 192.168.1.252 is offline" every time until the host becomes available again (https://prnt.sc/1dluijn). Firmware on 962UiGS-5HacT2HnT - 6.48.3 stable, firmware on RBLtAP-2HnD - 6.47.10 long term.
Maybe someone can help figure it out?