mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00:00
check-health: use $LogPrintExit
This commit is contained in:
@ -10,6 +10,7 @@
|
|||||||
:global CheckHealthVoltagePercent;
|
:global CheckHealthVoltagePercent;
|
||||||
:global Identity;
|
:global Identity;
|
||||||
|
|
||||||
|
:global LogPrintExit;
|
||||||
:global SendNotification;
|
:global SendNotification;
|
||||||
|
|
||||||
:local FormatVoltage do={
|
:local FormatVoltage do={
|
||||||
@ -52,7 +53,7 @@
|
|||||||
:if ([ :typeof ($CheckHealthLast->$Temperature) ] = "num" && \
|
:if ([ :typeof ($CheckHealthLast->$Temperature) ] = "num" && \
|
||||||
[ :typeof ($CheckHealthCurrent->$Temperature) ] = "num") do={
|
[ :typeof ($CheckHealthCurrent->$Temperature) ] = "num") do={
|
||||||
:if ([ :typeof ($CheckHealthTemperature->$Temperature) ] != "num" ) do={
|
:if ([ :typeof ($CheckHealthTemperature->$Temperature) ] != "num" ) do={
|
||||||
:log warning ("No threshold given for " . $Temperature . ", assuming 50C.");
|
$LogPrintExit warning ("No threshold given for " . $Temperature . ", assuming 50C.") false;
|
||||||
:set ($CheckHealthTemperature->$Temperature) 50;
|
:set ($CheckHealthTemperature->$Temperature) 50;
|
||||||
}
|
}
|
||||||
:if ($CheckHealthLast->$Temperature <= $CheckHealthTemperature->$Temperature && \
|
:if ($CheckHealthLast->$Temperature <= $CheckHealthTemperature->$Temperature && \
|
||||||
|
Reference in New Issue
Block a user