check-health: wording: load -> utilization

The load is defined as something different...

https://en.wikipedia.org/wiki/Load_(computing)

So let's update the wording and use 'utilization' instead.

---- ✂️ ----
🧮📈️ Health warning: CPU utilization

The average CPU utilization on MikroTik is at 76%!
---- ✂️ ----
🧮📉️ Health recovery: CPU utilization

The average CPU utilization on MikroTik decreased to 64%.
---- ✂️ ----
This commit is contained in:
Christian Hesse 2023-02-14 20:09:41 +01:00
parent e50e25c638
commit c48509683c
7 changed files with 19 additions and 19 deletions

View file

@ -10,8 +10,8 @@
:global GlobalFunctionsReady; :global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } :while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:global CheckHealthCPULoad; :global CheckHealthCPUUtilization;
:global CheckHealthCPULoadNotified; :global CheckHealthCPUUtilizationNotified;
:global CheckHealthFreeRAMNotified; :global CheckHealthFreeRAMNotified;
:global CheckHealthLast; :global CheckHealthLast;
:global CheckHealthTemperature; :global CheckHealthTemperature;
@ -37,18 +37,18 @@ $ScriptLock $0;
:local Resource [ /system/resource/get ]; :local Resource [ /system/resource/get ];
:set CheckHealthCPULoad (($CheckHealthCPULoad * 4 + ($Resource->"cpu-load") * 10) / 5); :set CheckHealthCPUUtilization (($CheckHealthCPUUtilization * 4 + ($Resource->"cpu-load") * 10) / 5);
:if ($CheckHealthCPULoad > 750 && $CheckHealthCPULoadNotified != true) do={ :if ($CheckHealthCPUUtilization > 750 && $CheckHealthCPUUtilizationNotified != true) do={
$SendNotification2 ({ origin=$0; \ $SendNotification2 ({ origin=$0; \
subject=([ $SymbolForNotification "abacus,chart-increasing" ] . "Health warning: CPU load"); \ subject=([ $SymbolForNotification "abacus,chart-increasing" ] . "Health warning: CPU utilization"); \
message=("The average CPU load on " . $Identity . " is at " . ($CheckHealthCPULoad / 10) . "%!") }); message=("The average CPU utilization on " . $Identity . " is at " . ($CheckHealthCPUUtilization / 10) . "%!") });
:set CheckHealthCPULoadNotified true; :set CheckHealthCPUUtilizationNotified true;
} }
:if ($CheckHealthCPULoad < 650 && $CheckHealthCPULoadNotified = true) do={ :if ($CheckHealthCPUUtilization < 650 && $CheckHealthCPUUtilizationNotified = true) do={
$SendNotification2 ({ origin=$0; \ $SendNotification2 ({ origin=$0; \
subject=([ $SymbolForNotification "abacus,chart-decreasing" ] . "Health recovery: CPU load"); \ subject=([ $SymbolForNotification "abacus,chart-decreasing" ] . "Health recovery: CPU utilization"); \
message=("The average CPU load on " . $Identity . " decreased to " . ($CheckHealthCPULoad / 10) . "%.") }); message=("The average CPU utilization on " . $Identity . " decreased to " . ($CheckHealthCPUUtilization / 10) . "%.") });
:set CheckHealthCPULoadNotified false; :set CheckHealthCPUUtilizationNotified false;
} }
:local CheckHealthFreeRAM ($Resource->"free-memory" * 100 / $Resource->"total-memory"); :local CheckHealthFreeRAM ($Resource->"free-memory" * 100 / $Resource->"total-memory");

View file

@ -12,7 +12,7 @@ Description
This script is run from scheduler periodically, sending notification on This script is run from scheduler periodically, sending notification on
health related events: health related events:
* high CPU load * high CPU utilization
* low available free RAM * low available free RAM
* voltage jumps up or down more than configured threshold * voltage jumps up or down more than configured threshold
* voltage drops below hard lower limit * voltage drops below hard lower limit
@ -21,18 +21,18 @@ health related events:
Note that bad initial state will not trigger an event. Note that bad initial state will not trigger an event.
Monitoring CPU load and available free RAM works on all devices. Other Monitoring CPU utilization and available free RAM works on all devices.
than that only sensors available in hardware can be checked. See what your Other than that only sensors available in hardware can be checked. See what
hardware supports: your hardware supports:
/system/health/print; /system/health/print;
### Sample notifications ### Sample notifications
#### CPU load #### CPU utilization
![check-health notification cpu load high](check-health.d/notification-01-cpu-load-high.avif) ![check-health notification cpu utilization high](check-health.d/notification-01-cpu-utilization-high.avif)
![check-health notification cpu load ok](check-health.d/notification-02-cpu-load-ok.avif) ![check-health notification cpu utilization ok](check-health.d/notification-02-cpu-utilization-ok.avif)
#### Available free RAM #### Available free RAM

View file

@ -96,7 +96,7 @@
85="Dropped 'netwatch-syslog', filtering in firewall is advised."; 85="Dropped 'netwatch-syslog', filtering in firewall is advised.";
86="Added support for hooks in 'sms-forward'. This now provides similar functionality to 'sms-action', but is more flexible."; 86="Added support for hooks in 'sms-forward'. This now provides similar functionality to 'sms-action', but is more flexible.";
87="Added support for extra text (or emojis \F0\9F\9A\80) in notification tags."; 87="Added support for extra text (or emojis \F0\9F\9A\80) in notification tags.";
88="Added support for monitoring CPU load and available free RAM in 'check-health'."; 88="Added support for monitoring CPU utilization and available free RAM in 'check-health'.";
89="Made the warning time for 'check-certificates' configurable."; 89="Made the warning time for 'check-certificates' configurable.";
90="Chat with your router! Introduced 'telegram-chat' to chat via Telegram bot and send commands to your router."; 90="Chat with your router! Introduced 'telegram-chat' to chat via Telegram bot and send commands to your router.";
91="Dropped check for CAP in 'check-routeros-update' to solve issues with wifiwave2 package."; 91="Dropped check for CAP in 'check-routeros-update' to solve issues with wifiwave2 package.";