mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
check-health: use second measure against temperature spikes
The old spike detection was still prone to false alerts. Let's do a second measurement and ignore on difference. This results in more measurements being ignored, but temperature is changing slowly only and it should not hurt.
This commit is contained in:
parent
13f7ba11da
commit
af50ed5909
1 changed files with 3 additions and 4 deletions
|
@ -70,11 +70,10 @@
|
||||||
$LogPrintExit info ("No threshold given for " . $Name . ", assuming 50C.") false;
|
$LogPrintExit info ("No threshold given for " . $Name . ", assuming 50C.") false;
|
||||||
:set ($CheckHealthTemperature->$Name) 50;
|
:set ($CheckHealthTemperature->$Name) 50;
|
||||||
}
|
}
|
||||||
:if ($Temperature > $CheckHealthLast->$Name + 20) do={
|
:if ($Temperature != [ / system health get $Name ]) do={
|
||||||
$LogPrintExit info ("The " . $Name . " spikes from " . $CheckHealthLast->$Name . \
|
$LogPrintExit debug ("The second measurement for " . $Name . " differs, ignoring.") false;
|
||||||
"C to " . $Temperature . "C, ignoring.") false;
|
|
||||||
:set Temperature ($CheckHealthLast->$Name);
|
:set Temperature ($CheckHealthLast->$Name);
|
||||||
:set ($CheckHealthCurrent->$Name) ($CheckHealthLast->$Name + 3);
|
:set ($CheckHealthCurrent->$Name) $Temperature;
|
||||||
}
|
}
|
||||||
:if ($Temperature > $CheckHealthTemperature->$Name && \
|
:if ($Temperature > $CheckHealthTemperature->$Name && \
|
||||||
$CheckHealthTemperatureNotified->$Name != true) do={
|
$CheckHealthTemperatureNotified->$Name != true) do={
|
||||||
|
|
Loading…
Reference in a new issue