doc/log-forward: add some more details

This commit is contained in:
Christian Hesse 2023-01-18 11:51:16 +01:00
parent 03fb459ea4
commit cfb31e840c

View file

@ -9,16 +9,24 @@ Forward log messages via notification
Description Description
----------- -----------
RouterOS supports sending log messages via e-mail or to a syslog server. RouterOS itself supports sending log messages via e-mail or to a syslog
This has some limitation, however: server (see `/system/logging`). This has some limitation, however:
* does not work early after boot if network connectivity is not * 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 * lots of messages generate a flood of mails
* Matrix and Telegram are not supported * Matrix and Telegram are not supported
The script is intended to be run periodically. It collects log messages The script works around the limitations, for example it does:
and forwards them via notification.
* 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 ### 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 * `LogForwardIncludeMessage`: define message text to be forwarded (even if
filter matches) 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 Also notification settings are required for
[e-mail](mod/notification-email.md), [e-mail](mod/notification-email.md),
[matrix](mod/notification-matrix.md) and/or [matrix](mod/notification-matrix.md) and/or