mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-08-02 17:24:30 +02:00
check-health: re-measure until we have a valid value
This commit is contained in:
parent
af50ed5909
commit
0545fbd899
1 changed files with 4 additions and 4 deletions
|
@ -70,10 +70,10 @@
|
|||
$LogPrintExit info ("No threshold given for " . $Name . ", assuming 50C.") false;
|
||||
:set ($CheckHealthTemperature->$Name) 50;
|
||||
}
|
||||
:if ($Temperature != [ / system health get $Name ]) do={
|
||||
$LogPrintExit debug ("The second measurement for " . $Name . " differs, ignoring.") false;
|
||||
:set Temperature ($CheckHealthLast->$Name);
|
||||
:set ($CheckHealthCurrent->$Name) $Temperature;
|
||||
:local Validate [ / system health get $Name ];
|
||||
:while ($Temperature != $Validate) do={
|
||||
:set Temperature $Validate;
|
||||
:set Validate [ / system health get $Name ];
|
||||
}
|
||||
:if ($Temperature > $CheckHealthTemperature->$Name && \
|
||||
$CheckHealthTemperatureNotified->$Name != true) do={
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue