mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
check-health: indicate voltage increase or decrease
This commit is contained in:
parent
185fe2c730
commit
d87c50cf68
3 changed files with 6 additions and 2 deletions
|
@ -17,6 +17,7 @@
|
|||
:global CheckHealthVoltagePercent;
|
||||
:global Identity;
|
||||
|
||||
:global IfThenElse;
|
||||
:global LogPrintExit2;
|
||||
:global ScriptLock;
|
||||
:global SendNotification2;
|
||||
|
@ -46,7 +47,8 @@ $ScriptLock $0;
|
|||
:if ($CheckHealthLast->$Name * (100 + $CheckHealthVoltagePercent) < $Voltage * 100 || \
|
||||
$CheckHealthLast->$Name * 100 > $Voltage * (100 + $CheckHealthVoltagePercent)) do={
|
||||
$SendNotification2 ({ origin=$0; \
|
||||
subject=([ $SymbolForNotification "high-voltage-sign" ] . "Health warning: " . $Name); \
|
||||
subject=([ $SymbolForNotification ("high-voltage-sign,chart-" . [ $IfThenElse ($CheckHealthLast->$Name < \
|
||||
$Voltage) "in" "de" ] . "creasing") ] . "Health warning: " . $Name); \
|
||||
message=("The " . $Name . " on " . $Identity . " jumped more than " . $CheckHealthVoltagePercent . "%.\n\n" . \
|
||||
"old value: " . [ $FormatVoltage ($CheckHealthLast->$Name) ] . "\n" . \
|
||||
"new value: " . [ $FormatVoltage $Voltage ]) });
|
||||
|
|
|
@ -151,7 +151,7 @@
|
|||
y="0"><tspan
|
||||
x="180"
|
||||
y="10.85"
|
||||
id="tspan13643">[MikroTik] ⚡ Health warning: voltage
|
||||
id="tspan13643">[MikroTik] ⚡📉 Health warning: voltage
|
||||
</tspan><tspan
|
||||
x="180"
|
||||
y="25.85"
|
||||
|
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
|
@ -1035,6 +1035,8 @@
|
|||
:local Symbols {
|
||||
"alarm-clock"="\E2\8F\B0";
|
||||
"calendar"="\F0\9F\93\85";
|
||||
"chart-decreasing"="\F0\9F\93\89";
|
||||
"chart-increasing"="\F0\9F\93\88";
|
||||
"cloud"="\E2\98\81";
|
||||
"cross-mark"="\E2\9D\8C";
|
||||
"fire"="\F0\9F\94\A5";
|
||||
|
|
Loading…
Reference in a new issue