Christian Hesse
89f4c91ccf
log-forward: change symbol for notification
2022-05-20 08:33:22 +02:00
Christian Hesse
0e73f85c11
log-forward: do *not* wait to be fully connected
...
Let's forward logs as early as possible.
All notification functions are expected to handle notifications with
queues, so nothing is lost. Just the opposite: Logs being rotated before
forwarding becomes less likely.
2022-05-16 12:42:38 +02:00
Christian Hesse
1c56809cd4
log-forward: RouterOS v7 path syntax
2022-05-11 13:48:27 +02:00
Christian Hesse
95e9820718
update copyright for 2022
2022-01-01 21:38:15 +01:00
Christian Hesse
ee57ddf595
log-forward: fix forwarding first message
...
Pulling the power cable results in log message on next boot:
dec/16 18:28:28 system,error,critical router rebooted without proper shutdown, probably power outage
This was not forwarded as it had the numeric id 0, which is not greater
than the zero we initialized with. Now initialized with -1 when no log
has been forwarded to fix this.
2021-12-17 11:48:25 +01:00
Christian Hesse
1ce0f63ef7
log-forward: use $HexToNum, do not resend old messages
...
Now we know the order of messages and can compare. Changing the filter
does no longer result in old messages being resent.
2021-06-15 16:59:02 +02:00
Christian Hesse
de61c14c60
log-forward: implement reverse logic to include messages...
...
... even if a filter matches to exclude them. Let's have an example:
:global LogForwardFilter "(debug|info)";
:global LogForwardInclude "account";
This will forward everything about topic *account* (login, logout,
failed login, ...) - even with topic *info*.
2021-06-09 14:42:43 +02:00
Christian Hesse
87cbc1edad
log-forward: pass origin to $SendNotification2
2021-04-28 13:58:37 +02:00
Christian Hesse
81f84353cd
log-forward: use $SendNotification2
2021-04-28 13:58:37 +02:00
Christian Hesse
5610926d0a
log-forward: use $EscapeForRegEx
2021-03-17 08:55:33 +01:00
Christian Hesse
baa096fe03
log-forward: filter e-mail error on log forwarding in script...
...
... and update the filter in global configuration.
2021-03-15 12:40:14 +01:00
Christian Hesse
b1647c760c
log-forward: list messages with 'black circle'
2021-03-04 18:47:55 +01:00
Christian Hesse
f762d395eb
log-forward: skip multi-repeated messages
2021-03-04 18:44:34 +01:00
Christian Hesse
041ca062b1
global: use $0 for $ScriptLock
2021-02-24 21:51:56 +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
efca1ec049
global-functions: drop $MailServerIsUp
...
Now that we have an e-mail queue we do not care if the server is up or not.
2021-02-16 16:45:13 +01:00
Christian Hesse
547fbc630a
update copyright for 2021
2021-01-01 21:33:52 +01:00
Christian Hesse
16d3709030
log-forward: add 'if any' in log message
2020-12-14 23:39:50 +01:00
Christian Hesse
4a85deb45c
log-forward: improve wording for single message
2020-10-18 20:16:54 +02:00
Christian Hesse
744542e925
log-forward: add rate limit to prevent flooding
2020-09-28 20:20:19 +02:00
Christian Hesse
d53cf3e8e7
log-forward: fix usage of function
2020-09-28 19:56:45 +02:00
Christian Hesse
697e32a306
log-forward: add filter on log message text
2020-09-25 22:21:59 +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
b27d875111
log-forward: lock script to run just once
2020-07-17 20:52:52 +02:00
Christian Hesse
075859c898
global-functions: introduce and use $SymbolForNotification
2020-07-17 08:12:00 +02:00
Christian Hesse
1b55c9b5a2
log-forward: use $SymbolByUnicodeName
2020-07-17 07:52:56 +02:00
Christian Hesse
96d473cfe8
log-forward: remember the last id only
2020-07-15 14:43:26 +02:00
Christian Hesse
6bce0a4b6a
add 'log-forward', drop 'early-errors'
2020-07-15 12:41:29 +02:00