mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-08-16 15:51:14 +02:00
doc/log-forward: add some more details
This commit is contained in:
parent
03fb459ea4
commit
cfb31e840c
1 changed files with 20 additions and 5 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue