Christian Hesse
93770d40a8
check-health: adopt new data structure for ROS 7.x
...
The PSU state has an empty string for type... Thus matching on name.
2022-01-14 09:20:09 +01:00
Christian Hesse
95e9820718
update copyright for 2022
2022-01-01 21:38:15 +01:00
Christian Hesse
2625cc09a5
check-health: support hard lower limit for voltage
...
... to detect slow decrease of voltage, for example with UPS.
2021-11-16 22:21:37 +01:00
Christian Hesse
d87c50cf68
check-health: indicate voltage increase or decrease
2021-11-16 22:21:37 +01:00
Christian Hesse
73dfb0c8ee
check-health: use $ScriptLock
2021-08-27 11:21:56 +02:00
Christian Hesse
baed8b5cfd
check-health: pass origin to $SendNotification2
2021-04-28 13:58:37 +02:00
Christian Hesse
bf315c15f6
check-health: use $SendNotification2
2021-04-28 13:58:37 +02:00
Christian Hesse
f46db91845
global: give script or function name in log messages
2021-02-24 21:51:54 +01:00
Christian Hesse
d5afc79eed
global: drop script 'global-wait'
...
All scripts wait for the global functions on their own now.
2021-02-18 21:45:38 +01:00
Christian Hesse
547fbc630a
update copyright for 2021
2021-01-01 21:33:52 +01:00
Christian Hesse
0545fbd899
check-health: re-measure until we have a valid value
2020-11-24 13:54:36 +01:00
Christian Hesse
af50ed5909
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.
2020-11-24 13:45:57 +01:00
Christian Hesse
13f7ba11da
check-health: do not write unicode to log
2020-11-20 12:01:15 +01:00
Christian Hesse
b97d5308b1
check-health: guard against temperature spikes
...
Looks like devices out there suffer sensor issue or bug where
temperature value spikes and drops immediately:
https://forum.mikrotik.com/viewtopic.php?t=111030
https://forum.mikrotik.com/viewtopic.php?t=111109
https://forum.mikrotik.com/viewtopic.php?t=151242
... and possibly more.
Let's ignore these spikes, but at the same time increase the current
value to bring it into line - in case it's real.
2020-11-19 21:23:27 +01:00
Christian Hesse
88f9948c72
check-health: handle formatting by picking from string
...
The mathematical way is more elegant, but just picking the char from
string is shorter. 😜
2020-11-19 20:24:09 +01:00
Christian Hesse
7adfd1b670
check-health: properly handle voltage value below one
...
Before this produced division by zero...
2020-11-19 16:32:12 +01:00
Christian Hesse
8b07119f38
check-health: decrease log severity to info
2020-11-13 22:17:55 +01:00
Christian Hesse
211edb93c0
check-health: do not hardcode names, use as available
2020-10-17 23:05:08 +02:00
Christian Hesse
6d9eb99e08
check-health: add deviation on temperature recovery threshold
...
This helps against notification flooding.
2020-10-16 22:58:14 +02:00
Christian Hesse
3e72d1ec0b
check-health: give error on messing health values
2020-10-16 21:35:44 +02:00
Christian Hesse
49737af6d1
extend magic pattern with "by RouterOS"
...
This matches the string included in export.
2020-09-18 11:00:27 +02:00
Christian Hesse
075859c898
global-functions: introduce and use $SymbolForNotification
2020-07-17 08:12:00 +02:00
Christian Hesse
17e9635ca1
check-health: use $SymbolByUnicodeName
2020-07-17 07:52:56 +02:00
Christian Hesse
806d9bd4fb
check-health: move symbol before text
2020-07-16 17:48:21 +02:00
Christian Hesse
5d7d2e9ac6
check-health: add symbol for voltage
2020-07-15 21:01:15 +02:00
Christian Hesse
efd0b0d274
check-health: new symbol for high temperature
2020-07-15 20:52:24 +02:00
Christian Hesse
71ad56aacc
explicitly name the license
...
Copyright (C) 2013-2020 Christian Hesse <mail@eworm.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
https://www.gnu.org/licenses/#GPL
https://www.gnu.org/licenses/gpl.html
https://www.gnu.org/licenses/gpl.md
2020-06-19 22:17:42 +02:00
Christian Hesse
1f1fef9fb5
check-health: use $LogPrintExit
2020-04-03 17:29:08 +02:00
Christian Hesse
ff867d1b6b
add doc/check-health.md
2020-03-27 22:12:49 +01:00
Christian Hesse
524cc29e99
check-health: add fancy unicode symbols
2020-03-24 12:38:03 +01:00
Christian Hesse
63ed093340
check-health: add encoded degree sign
2020-03-09 16:23:10 +01:00
Christian Hesse
c7034ca5af
check-health: never divide, always multiply
...
With RouterOS we have integral numbers only. This prevent from having
friction that is cut off.
2020-01-24 08:17:42 +01:00
Christian Hesse
6e5e0e72bd
check-health: always calculate on the lower voltage value
...
This makes sure an alert is triggered in both directions. Before we could have:
24.0V to 21.8V -> OK
21.8V to 24.0V -> Alert!
2020-01-24 08:16:54 +01:00
Christian Hesse
afb9839073
update copyright for 2020
2020-01-01 17:00:39 +01:00
Christian Hesse
39815662f7
check-health: work with battery property
...
Seen on wAP R... No idea what this is.
2019-10-18 12:25:27 +02:00
Christian Hesse
f40bb2c8c8
check-health: make threshold for voltage configurable
2019-10-14 19:13:31 +02:00
Christian Hesse
63ca79b960
check-health: check for valid psu state data
...
This is required with recovery notifications
2019-08-28 20:48:32 +02:00
Christian Hesse
b74d465cd0
check-health: also send recovery notifications
2019-08-27 15:20:11 +02:00
Christian Hesse
29dc1b8841
add script 'check-health'
...
This may be incomplete... Please report if you have missing PSUs,
ttemperature sensors, whatever.
2019-08-27 12:01:32 +02:00