aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2023-01-18 11:51:16 +0100
committerGravatar Christian Hesse <mail@eworm.de>2023-01-18 11:53:57 +0100
commitcfb31e840c9c0a44127f74602dac672e342a9401 (patch)
tree587eaf2331cd81cbf3626de206485de1a944b353 /doc
parent03fb459ea4d1ec6e09d4d87b8c8e94b887f9ed89 (diff)
doc/log-forward: add some more details
Diffstat (limited to 'doc')
-rw-r--r--doc/log-forward.md25
1 files changed, 20 insertions, 5 deletions
diff --git a/doc/log-forward.md b/doc/log-forward.md
index d3a1908..250dbf9 100644
--- a/doc/log-forward.md
+++ b/doc/log-forward.md
@@ -9,16 +9,24 @@ Forward log messages via notification
Description
-----------
-RouterOS supports sending log messages via e-mail or to a syslog server.
-This has some limitation, however:
+RouterOS itself supports sending log messages via e-mail or to a syslog
+server (see `/system/logging`). This has some limitation, however:
* does not work early after boot if network connectivity is not
- yet established
+ yet established, or breaks intermittently
* lots of messages generate a flood of mails
* Matrix and Telegram are not supported
-The script is intended to be run periodically. It collects log messages
-and forwards them via notification.
+The script works around the limitations, for example it does:
+
+* read from `/log`, including messages from early boot
+* skip multi-repeated messages
+* rate-limit itself to mitigate flooding
+* forward via notification (which includes *e-mail*, *Matrix* and *Telegram*
+ when installed and configured, see below)
+
+It is intended to be run periodically from scheduler, then collects new
+log messages and forwards them via notification.
### Sample notification
@@ -46,6 +54,13 @@ The configuration goes to `global-config-overlay`, these are the parameters:
* `LogForwardIncludeMessage`: define message text to be forwarded (even if
filter matches)
+These patterns are matched as
+[regular expressions](https://wiki.mikrotik.com/wiki/Manual:Regular_Expressions).
+To forward **all** (ignoring severity) log messages with topics `account`
+(which includes user logins) and `dhcp` you need something like:
+
+ :global LogForwardInclude "(account|dhcp)";
+
Also notification settings are required for
[e-mail](mod/notification-email.md),
[matrix](mod/notification-matrix.md) and/or