mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
log-forward: RouterOS v7 path syntax
This commit is contained in:
parent
efc3e997ef
commit
1c56809cd4
1 changed files with 3 additions and 3 deletions
|
@ -52,10 +52,10 @@ $WaitFullyConnected;
|
|||
:local LogForwardFilterLogForwarding ("^" . [ $EscapeForRegEx ("Error sending e-mail <" . \
|
||||
[ $QuotedPrintable ("[" . $Identity . "] " . [ $SymbolForNotification "warning-sign" ] . \
|
||||
"Log Forwarding") ] . ">:") ]);
|
||||
:foreach Message in=[ / log find where (!(message="") and !(message~$LogForwardFilterLogForwarding) and \
|
||||
:foreach Message in=[ /log/find where (!(message="") and !(message~$LogForwardFilterLogForwarding) and \
|
||||
!(topics~$LogForwardFilter) and !(message~$LogForwardFilterMessage)) or \
|
||||
topics~$LogForwardInclude or message~$LogForwardIncludeMessage ] do={
|
||||
:set MessageVal [ / log get $Message ];
|
||||
:set MessageVal [ /log/get $Message ];
|
||||
|
||||
:if ($Last < [ $HexToNum ($MessageVal->".id") ]) do={
|
||||
:local DupCount ($MessageDups->($MessageVal->"message"));
|
||||
|
@ -75,7 +75,7 @@ $WaitFullyConnected;
|
|||
subject=([ $SymbolForNotification "warning-sign" ] . "Log Forwarding"); \
|
||||
message=("The log on " . $Identity . " contains " . [ $IfThenElse ($Count = 1) \
|
||||
"this message" ("these " . $Count . " messages") ] . " after " . \
|
||||
[ / system resource get uptime ] . " uptime." . [ $IfThenElse ($Duplicates = true) \
|
||||
[ /system/resource/get uptime ] . " uptime." . [ $IfThenElse ($Duplicates = true) \
|
||||
(" Multi-repeated messages have been skipped.") ] . "\n" . $Messages) });
|
||||
|
||||
:set LogForwardRateLimit ($LogForwardRateLimit + 10);
|
||||
|
|
Loading…
Reference in a new issue