log.dat: Fix an error with 'monit' logging too much data.

Making the regex "non-greedy" fixes an error Jon found.

'monit' logged a whole line from '/var/log/messages' where it should only log the first part.

Reference:
https://www.ultraedit.com/support/tutorials-power-tips/ultraedit/non-greedy-perl-regex.html

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
This commit is contained in:
Matthias Fischer
2022-01-21 18:07:56 +01:00
committed by Peter Müller
parent e0a904f56a
commit 8f58e6612b

View File

@@ -62,7 +62,7 @@ my %sections = (
'ipfire' => '(ipfire: )',
'ipsec' => '(ipsec_[\w_]+: |pluto\[.*\]: |charon: |vpnwatch: )',
'kernel' => '(kernel: (?!DROP_))',
'monit' => '(monit\[.*\]: )',
'monit' => '(monit\[.*?\]: )',
'ntp' => '(ntpd(?:ate)?\[.*\]: )',
'oinkmaster' => '(oinkmaster\[.*\]: )',
'openvpn' => '(openvpnserver\[.*\]: |.*n2n\[.*\]: )',