From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter =?utf-8?q?M=C3=BCller?= To: development@lists.ipfire.org Subject: Re: [PATCH] log.dat: Fix an error with 'monit' logging too much data. Date: Tue, 25 Jan 2022 16:53:48 +0000 Message-ID: <2bab3b1b-11b0-40aa-13e0-4456c6f3c340@ipfire.org> In-Reply-To: <20220121170756.3466085-1-matthias.fischer@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3065926608381144872==" List-Id: --===============3065926608381144872== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Reviewed-by: Peter M=C3=BCller > Making the regex "non-greedy" fixes an error Jon found. >=20 > 'monit' logged a whole line from '/var/log/messages' where it should only l= og the first part. >=20 > Reference: > https://www.ultraedit.com/support/tutorials-power-tips/ultraedit/non-greedy= -perl-regex.html >=20 > Signed-off-by: Matthias Fischer > --- > html/cgi-bin/logs.cgi/log.dat | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > 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\[.*\]: )', --===============3065926608381144872==--