mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
check-health: guard against temperature spikes
Looks like devices out there suffer sensor issue or bug where temperature value spikes and drops immediately: https://forum.mikrotik.com/viewtopic.php?t=111030 https://forum.mikrotik.com/viewtopic.php?t=111109 https://forum.mikrotik.com/viewtopic.php?t=151242 ... and possibly more. Let's ignore these spikes, but at the same time increase the current value to bring it into line - in case it's real.
This commit is contained in:
parent
88f9948c72
commit
b97d5308b1
1 changed files with 6 additions and 0 deletions
|
@ -70,6 +70,12 @@
|
|||
$LogPrintExit info ("No threshold given for " . $Name . ", assuming 50C.") false;
|
||||
:set ($CheckHealthTemperature->$Name) 50;
|
||||
}
|
||||
:if ($Temperature > $CheckHealthLast->$Name + 20) do={
|
||||
$LogPrintExit info ("The " . $Name . " spikes from " . $CheckHealthLast->$Name . \
|
||||
"\C2\B0" . "C to " . $Temperature . "\C2\B0" . "C, ignoring.") false;
|
||||
:set Temperature ($CheckHealthLast->$Name);
|
||||
:set ($CheckHealthCurrent->$Name) ($CheckHealthLast->$Name + 3);
|
||||
}
|
||||
:if ($Temperature > $CheckHealthTemperature->$Name && \
|
||||
$CheckHealthTemperatureNotified->$Name != true) do={
|
||||
$SendNotification ([ $SymbolForNotification "fire" ] . "Health warning: " . $Name) \
|
||||
|
|
Loading…
Reference in a new issue