From: Matthias Fischer Date: Fri, 21 Jan 2022 17:07:56 +0000 (+0100) Subject: log.dat: Fix an error with 'monit' logging too much data. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8f58e6612b63a0b3bcfabd36dc2e0dbf958e6d98;p=people%2Fstevee%2Fipfire-2.x.git 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 Reviewed-by: Peter Müller --- diff --git a/html/cgi-bin/logs.cgi/log.dat b/html/cgi-bin/logs.cgi/log.dat index 0d6c6722a6..3364b7bea5 100644 --- a/html/cgi-bin/logs.cgi/log.dat +++ b/html/cgi-bin/logs.cgi/log.dat @@ -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\[.*\]: )',