Christian Hesse
0b46c508dc
netwatch-notify: nest conditions
...
The logic here was right, but RouterOS runs the checks simultaneously.
This caused delays even if no resolving was needed.
Nesting the checks fixes this.
2022-02-10 08:41:12 +01:00
Christian Hesse
c6e581d4f9
netwatch-notify: allow to suppress notification on host down
2022-02-10 08:41:12 +01:00
Christian Hesse
cd3fde59d7
netwatch-notify: give netwatch some time to settle
2022-01-03 10:00:16 +01:00
Christian Hesse
491ecdb812
netwatch-notify: initialize after lock
2022-01-03 10:00:16 +01:00
Christian Hesse
7f0a8cdfcd
netwatch-notify: better match notify-entries
2022-01-03 10:00:16 +01:00
Christian Hesse
95e9820718
update copyright for 2022
2022-01-01 21:38:15 +01:00
Christian Hesse
7afce17f70
netwatch-notify: use $ScriptLock
2021-08-27 11:20:57 +02:00
Christian Hesse
bccb7c3452
netwatch-notify: implement pre-down hook
2021-07-09 12:46:03 +02:00
Christian Hesse
c5d49b37f3
netwatch-notify: run hook from a function
2021-07-08 13:38:21 +02:00
Christian Hesse
87ce4a86b7
netwatch-notify: add error handling for hooks
...
We already had syntax validation, but a script with valid synctax can
still fail to run...
2021-07-08 13:02:57 +02:00
Christian Hesse
05a7ae409b
netwatch-notify: add info on hook in notification
2021-05-18 16:44:07 +02:00
Christian Hesse
96621e01cb
netwatch-notify: log failed resolve just once
2021-05-06 15:34:04 +02:00
Christian Hesse
0b1bb0f2b2
netwatch-notify: attempt to update address with working resolver only
2021-05-06 15:33:52 +02:00
Christian Hesse
cfb31e844c
netwatch-notify: support dynamic address update
2021-05-06 15:11:05 +02:00
Christian Hesse
9d19313eee
netwatch-notify: log on host up...
...
... if logged on host down before.
2021-05-06 15:11:05 +02:00
Christian Hesse
e6223a3661
netwatch-notify: pass origin to $SendNotification2
2021-04-28 13:58:37 +02:00
Christian Hesse
557016387c
netwatch-notify: use $SendNotification2
2021-04-28 13:58:37 +02:00
Christian Hesse
99d3e5d578
netwatch-notify: use $ValidateSyntax
2021-02-26 16:23:13 +01: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
23923619dd
netwatch-notify: increase count for every parent in chain
2020-11-17 22:28:05 +01:00
Christian Hesse
e7855b4611
netwatch-notify: support parents in a chain
2020-11-17 22:28:05 +01:00
Christian Hesse
d5125b816a
netwatch-notify: be more verbose in logs
2020-11-17 22:28:05 +01:00
Christian Hesse
6c14412aa9
netwatch-notify: implemented simple dependency model
2020-11-17 22:28:05 +01:00
Christian Hesse
cf5220278d
netwatch-notify: unbreak custom count
2020-11-17 14:22:29 +01: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
92ca31a41d
netwatch-notify: be more verbose on host downtime
...
Signed-off-by: Christian Hesse <mail@eworm.de>
2020-08-24 14:26:55 +02:00
Christian Hesse
e58d8e4373
netwatch-notify: make check count threshold configurable
...
Signed-off-by: Christian Hesse <mail@eworm.de>
2020-08-24 14:26:55 +02:00
Christian Hesse
1bac1b4d3d
netwatch-notify: ignore disabled hosts
2020-07-18 00:01:51 +02:00
Christian Hesse
075859c898
global-functions: introduce and use $SymbolForNotification
2020-07-17 08:12:00 +02:00
Christian Hesse
4a5185ae28
netwatch-notify: use $SymbolByUnicodeName
2020-07-17 07:52:56 +02:00
Christian Hesse
5859b0406e
netwatch-notify: move symbol before text
2020-07-16 17:51:21 +02:00
Christian Hesse
a79461aff2
netwatch-notify: add up hook for consistency
...
Also this works around the permission/policy limitations in
netwatch scripts.
2020-07-06 15:44:41 +02:00
Christian Hesse
1c10044b24
netwatch-notify: add support for down hook
...
Adding up-hook does not make sense... Just use netwatch's up-script for that.
2020-07-03 15:27:21 +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
f482c565c7
add doc/netwatch-notify.md
2020-03-27 22:12:49 +01:00
Christian Hesse
7e982a470d
netwatch-notify: add fancy unicode symbols
...
https://www.compart.com/de/unicode/block/U+2700
2020-03-24 12:28:06 +01:00
Christian Hesse
111e339d06
netwatch-notify: report the number of checks a host was down
2020-03-24 12:12:00 +01:00
Christian Hesse
f3e2fb654b
netwatch-notify: add logging
2020-03-05 12:47:42 +01:00
Christian Hesse
9aed03693c
netwatch-notify: fix handling of array
...
Looks like handling of more-dimensional arrays is a bit tricky in
RouterOS... Without this *all* values with the same key name are
updated, independent of intermediate name.
2020-03-05 12:42:21 +01:00
Christian Hesse
f90c59e4fb
netwatch-notify: properly initialize default values
2020-03-05 08:15:36 +01:00
Christian Hesse
478688d534
netwatch-notify: use another level of array
2020-03-04 21:01:21 +01:00
Christian Hesse
e588607efd
add script netwatch-notify
2020-03-04 15:56:40 +01:00