diff options
author | Christian Hesse <mail@eworm.de> | 2022-05-10 15:08:30 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2022-05-11 13:48:27 +0200 |
commit | 1c56809cd4303ab1c38ffddf5d429ec22a57bd1e (patch) | |
tree | bf322ba5a889a7d19420c50b464414ff904aad93 /log-forward | |
parent | efc3e997ef4e4ad22cbfe9213693981e0f6b0694 (diff) |
log-forward: RouterOS v7 path syntax
Diffstat (limited to 'log-forward')
-rw-r--r-- | log-forward | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/log-forward b/log-forward index 3cd83d5..1aa0363 100644 --- a/log-forward +++ b/log-forward @@ -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); |