Looking to implement a check to confirm if routes are up and running for various subnets. Trying to get it working with Netwatch and an output to log at the moment but a major issue in the Loop that my inferior scripting skills have not managed to solve, so I turn to the forum for assistance.
Thanks to @Jotne for getting me this far with his post viewtopic.php?p=888800#p888800
Netwatch:
Host - 8.8.8.8
Up - Pointing to script "Test"
Down - Pointing to script "Test"
Script:
Name - Test
Source -
Code: Select all
:local Host $host
/tool netwatch
:local Status [get [find where host="$Host"] status]
:while ($Status="down") do= {:log error "Down"}
This currently outputs an endless barrage of error log "Down" without end, only way I've found is a reboot. How can I get this error message to loop every minute if the netwatch status is marked as down and then to stop when status is up?