Community discussions

 
MrBZA
just joined
Topic Author
Posts: 2
Joined: Fri Jun 20, 2014 11:05 pm

Netwatch permissions with global variables

Sun Jul 22, 2018 9:35 pm

Netwatch has restricted permissions so it is not able to read or write global variables, this essentially makes it useless for integrating with complex monitoring scripting.
If you want to execute a script from netwatch, it can only have ‘read’ ‘write’ ‘reboot’ 'test’ permissions. Using global variables requires the ‘policy’ permission.

I saw some workarounds to this problem on another thread that essentially scripted the functionality of netwatch in a schedule. Another used static dns entries to replace global variables.

What worked for me was to schedule a status monitor for netwatch:
:global nwstatus  [/tool netwatch get [find comment="my netwatch host comment"] status]
This will be "up" or "down"

Hope it helps and if you have a better way, please share!
 
monfi
just joined
Posts: 4
Joined: Thu May 26, 2016 6:00 am

Re: Netwatch permissions with global variables

Wed Jul 24, 2019 5:51 pm

Thanks friend with this script reference, i did could write my own script in order to read state of an UPS! Kindly regards! from Loja,Ecuador, Latin America

Who is online

Users browsing this forum: No registered users and 8 guests