From patchwork Fri Jan 21 17:07:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matthias Fischer X-Patchwork-Id: 4977 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4JgQn73lptz3wcx for ; Fri, 21 Jan 2022 17:08:11 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4JgQn61lnWzWD; Fri, 21 Jan 2022 17:08:10 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4JgQn55563z2ySt; Fri, 21 Jan 2022 17:08:09 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4JgQn45DgNz2ySt for ; Fri, 21 Jan 2022 17:08:08 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4JgQn409dtzWD for ; Fri, 21 Jan 2022 17:08:07 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1642784888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=57H9vrpSUhJxz9edJ4+O8o21fiKDy4wow7v+Pc945BE=; b=+tvVz54Q/ilNOX3ZSsNCZ9k1zf9vmUpOSqBhk3AWLd5k/h/PrQQwoBcKn8IMn658e8Q40a WVpuhVg8DR7kM2Cg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1642784888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=57H9vrpSUhJxz9edJ4+O8o21fiKDy4wow7v+Pc945BE=; b=uZyPqURisCyq5zYOfhG/xqvpdoI7xUe5eeZ6/RHvCH52dGOfL2qo4vh9wX17TFS5L/jvd6 nzZKr4dyQx/B/XOmqOYB08Ih76UtqgnZOzFiTX+DRTWdhVBv++v1Kmjm7XB4qWYZfa7Zdg /eb6jNSeu+dwPP1F/UqtSrlasl/vNRoPC3pacXodIwFO0QWy5CtYTVxIY3MHOs/MpQLfs2 Tb9lek30KcN5fGsNFUUI02dLuCrBbVyJ6phwS4q8ziNwHh3ulvm/EKAahDSxIc6EKVh1ja yDc44OamdhEzgAM3iVSSdlb63ooGPZVte9/G3g/i4S3NO+TGLjtknSant9EGow== 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 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" 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 Reviewed-by: Bernhard Bitsch --- 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 = ( 'ipfire' => '(ipfire: )', 'ipsec' => '(ipsec_[\w_]+: |pluto\[.*\]: |charon: |vpnwatch: )', 'kernel' => '(kernel: (?!DROP_))', - 'monit' => '(monit\[.*\]: )', + 'monit' => '(monit\[.*?\]: )', 'ntp' => '(ntpd(?:ate)?\[.*\]: )', 'oinkmaster' => '(oinkmaster\[.*\]: )', 'openvpn' => '(openvpnserver\[.*\]: |.*n2n\[.*\]: )',