mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-20 10:57:51 +02:00
check-health: fail if global functions do not become ready
This commit is contained in:
parent
9b811e1ed2
commit
96cbb32a4f
1 changed files with 3 additions and 3 deletions
|
@ -8,11 +8,11 @@
|
||||||
# check for RouterOS health state
|
# check for RouterOS health state
|
||||||
# https://rsc.eworm.de/doc/check-health.md
|
# https://rsc.eworm.de/doc/check-health.md
|
||||||
|
|
||||||
:global GlobalFunctionsReady;
|
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
|
||||||
|
|
||||||
:local ExitOK false;
|
:local ExitOK false;
|
||||||
:onerror Err {
|
:onerror Err {
|
||||||
|
:global GlobalFunctionsReady;
|
||||||
|
:retry { :if ($GlobalFunctionsReady != true) \
|
||||||
|
do={ :error ("Global functions not ready."); }; } delay=500ms max=50;
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:global CheckHealthCPUUtilization;
|
:global CheckHealthCPUUtilization;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue