]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
log.dat: Fix an error with 'monit' logging too much data.
authorMatthias Fischer <matthias.fischer@ipfire.org>
Fri, 21 Jan 2022 17:07:56 +0000 (18:07 +0100)
committerPeter Müller <peter.mueller@ipfire.org>
Tue, 25 Jan 2022 17:33:00 +0000 (17:33 +0000)
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>
html/cgi-bin/logs.cgi/log.dat

index 0d6c6722a6c749da035efa3cccd54f4a8227cf23..3364b7bea5bb4eac1c6df9204edd4d45dc824055 100644 (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\[.*\]: )',