check-health.d/temperature: give the cpu utilization in notification...

... to give a first hint if high load is an issue.
This commit is contained in:
Christian Hesse 2026-07-16 13:06:51 +02:00
parent 0763344ba1
commit b828989d8c
3 changed files with 5 additions and 2 deletions

View file

@ -14,6 +14,7 @@
:local FuncName [ :tostr $0 ];
:local ScriptName [ :tostr $1 ];
:global CheckHealthCPUUtilization;
:global CheckHealthLast;
:global CheckHealthTemperature;
:global CheckHealthTemperatureDeviation;
@ -57,7 +58,8 @@
$SendNotification2 ({ origin=$ScriptName; \
subject=([ $SymbolForNotification "fire" ] . "Health warning: " . $Name); \
message=("The " . $Name . " on " . $Identity . " is above threshold: " . \
$Value . "\C2\B0" . "C") });
$Value . "\C2\B0C\n\n" . "The average CPU utilization is at " . \
($CheckHealthCPUUtilization / 10) . "%!") });
:set ($CheckHealthTemperatureNotified->$Name) true;
}
:if ($Value <= ($CheckHealthTemperature->$Name - $CheckHealthTemperatureDeviation) && \
@ -65,7 +67,8 @@
$SendNotification2 ({ origin=$ScriptName; \
subject=([ $SymbolForNotification "white-heavy-check-mark" ] . "Health recovery: " . $Name); \
message=("The " . $Name . " on " . $Identity . " dropped below threshold: " . \
$Value . "\C2\B0" . "C") });
$Value . "\C2\B0C\n\n" . "The average CPU utilization is at " . \
($CheckHealthCPUUtilization / 10) . "%!") });
:set ($CheckHealthTemperatureNotified->$Name) false;
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Before After
Before After