mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-07-16 14:21:34 +00:00
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:
parent
0763344ba1
commit
b828989d8c
3 changed files with 5 additions and 2 deletions
|
|
@ -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 |
Binary file not shown.
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 4.2 KiB |
Loading…
Add table
Add a link
Reference in a new issue