From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthias Fischer To: development@lists.ipfire.org Subject: [PATCH] log.dat: Fix an error with 'monit' logging too much data. Date: Fri, 21 Jan 2022 18:07:56 +0100 Message-ID: <20220121170756.3466085-1-matthias.fischer@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4892669529765948078==" List-Id: --===============4892669529765948078== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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-p= erl-regex.html Signed-off-by: Matthias Fischer --- html/cgi-bin/logs.cgi/log.dat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/cgi-bin/logs.cgi/log.dat b/html/cgi-bin/logs.cgi/log.dat index 0d6c6722a..3364b7bea 100644 --- a/html/cgi-bin/logs.cgi/log.dat +++ b/html/cgi-bin/logs.cgi/log.dat @@ -62,7 +62,7 @@ my %sections =3D ( 'ipfire' =3D> '(ipfire: )', 'ipsec' =3D> '(ipsec_[\w_]+: |pluto\[.*\]: |charon: |vpnwatch: )', 'kernel' =3D> '(kernel: (?!DROP_))', - 'monit' =3D> '(monit\[.*\]: )', + 'monit' =3D> '(monit\[.*?\]: )', 'ntp' =3D> '(ntpd(?:ate)?\[.*\]: )', 'oinkmaster' =3D> '(oinkmaster\[.*\]: )', 'openvpn' =3D> '(openvpnserver\[.*\]: |.*n2n\[.*\]: )', --=20 2.25.1 --===============4892669529765948078==--