From patchwork Tue Apr 18 18:45:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Roevens X-Patchwork-Id: 6793 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) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4Q1CYC63D6z3xDh for ; Tue, 18 Apr 2023 18:45:51 +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) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4Q1CY84mWczc4; Tue, 18 Apr 2023 18:45:48 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4Q1CY83DP7z2ydF; Tue, 18 Apr 2023 18:45:48 +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 4Q1CY65pTHz2y1F for ; Tue, 18 Apr 2023 18:45:46 +0000 (UTC) Received: from knopi.disroot.org (knopi.disroot.org [178.21.23.139]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPS id 4Q1CY62C44z3n5 for ; Tue, 18 Apr 2023 18:45:46 +0000 (UTC) Authentication-Results: mail01.ipfire.org; dkim=pass header.d=disroot.org header.s=mail header.b="Aa/Xyq/o"; spf=pass (mail01.ipfire.org: domain of robin.roevens@disroot.org designates 178.21.23.139 as permitted sender) smtp.mailfrom=robin.roevens@disroot.org; dmarc=pass (policy=reject) header.from=disroot.org ARC-Seal: i=1; s=202003rsa; d=lists.ipfire.org; t=1681843546; a=rsa-sha256; cv=none; b=vAPHeSjzJY9GXnDBCt0LHq/oMhuzsfbZkF34diRqs5YPNgD/a4pjwontTr/KI1EfR7sm9+ SDt2MFmTBIjP//8RGKcnkMXrRZawYi1M6upkMUu7ji4P8cfyBN7GFVmPqAcYk7sJM4x3ij /wsAt24iE5F7Ah3sxL2/YZQmQ9TXrlGNClivxKMS4rwNQHRottxR+OBsxIWp+XHmHRUZgZ 2aUaTf2xFh+d6Iuvm6tlZr4zpnHY1ZtMYcJGE2GXMQn3tdFQnJfgufAa/e2+d8EMirRvEw 07ayk/TwyR61o4V+c0q50DRhnVUa1inMuXNuERWqR4fvUsA9v8rVEWj0vw4OzQ== ARC-Authentication-Results: i=1; mail01.ipfire.org; dkim=pass header.d=disroot.org header.s=mail header.b="Aa/Xyq/o"; spf=pass (mail01.ipfire.org: domain of robin.roevens@disroot.org designates 178.21.23.139 as permitted sender) smtp.mailfrom=robin.roevens@disroot.org; dmarc=pass (policy=reject) header.from=disroot.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.ipfire.org; s=202003rsa; t=1681843546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=4achisbTBxnxDXIdWpV76vmH2Kwd3JB3oxQQP06QQEM=; b=wRGr9/YBDa6rKOKqD2YuihR/97t1gLtY769fKWsFdszttHsEFldymuqfQq1H5uicIpc7lq 2aRBebrvdFSE8kiI7h2XHNVhhN9OZ0ame2VotFUw0gkqP41kDepeckDfTF5GRDvIYTxCMV 4BTA6jTmC2kzlg/Cne45v28kQWxCRW++BTvOSNU1/0ZuPaG1lsu6Ik+V+foYQoXZbYl6lB I3WfWZgULc6UXKpr2Kwnu1n+Q+9Iqvr78znqsLZGA7R7SjsePKO+xe7kCNt/mEOl7mPtkB zeHduyD3KFoIZyKHaL94CF3tgzMmvQhjsOpwkpZJR/eFQeECp/moA7tLjkLS1Q== Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id B0CF9401ED for ; Tue, 18 Apr 2023 20:45:45 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id A_4uuw6_augw for ; Tue, 18 Apr 2023 20:45:44 +0200 (CEST) Received: from chojin.sicho.home (amaterasu.sicho.home [192.168.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (no client certificate requested) (Authenticated sender) by hachiman (MailScanner Milter) with SMTP id E4681D0BCA; Tue, 18 Apr 2023 20:45:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1681843543; bh=Vd/gPjOwk2aSoilvH6T5Ax1Rqk+ksUM0MNllBYyeGZk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Aa/Xyq/oHlKKHr89LMIYovqWhMyt1wrDNODREvC4ENK0xAjhKuGjuWBiGOLUQ6AJl Z/+yAqt6HP9ET5fus/q+z7GFRAL3VqafBK36lsgtqxKH421UwTHAkwj3Q+F3w5VWof MbsowLccidfYk3LuA3UDk8llllPKhqi2zXByVtNn5DxzlEZomCkRPJiMt6qq3/JLuU y3hTKg7Obd9fEg/jl+C8MszqNSLckvuwKkJO6DloaRyDegOfLv8C9txnWWc22lKw3B 8/ZcXHQllKEosJm5yD/N4CCrP4yKZjtECHU38H7ueX6+YImrN8mCDXaoKvTEQHEkjL CBIczWq9ZXrQg== From: Robin Roevens To: development@lists.ipfire.org Subject: [PATCH v2 1/3] zabbix_agentd: Update to 6.0.16 (LTS) Date: Tue, 18 Apr 2023 20:45:10 +0200 Message-Id: <20230418184512.2235-2-robin.roevens@disroot.org> In-Reply-To: <20230418184512.2235-1-robin.roevens@disroot.org> References: <20230418184512.2235-1-robin.roevens@disroot.org> MIME-Version: 1.0 X-sicho-MailScanner-ID: E4681D0BCA.A8A80 X-sicho-MailScanner: Found to be clean X-sicho-MailScanner-From: robin.roevens@disroot.org X-sicho-MailScanner-Watermark: 1682448327.0776@6Vf48EWRCiOhu9BmMSG5WQ X-Rspamd-Action: no action X-Rspamd-Server: mail01.haj.ipfire.org X-Rspamd-Queue-Id: 4Q1CY62C44z3n5 X-Spamd-Result: default: False [-1.03 / 11.00]; BAYES_HAM(-2.37)[97.11%]; SPF_REPUTATION_SPAM(1.86)[0.61852363191687]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM(-1.00)[-0.996]; DMARC_POLICY_ALLOW(-0.50)[disroot.org,reject]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[disroot.org:s=mail]; R_SPF_ALLOW(-0.20)[+a:c]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; IP_REPUTATION_HAM(-0.01)[asn: 50673(0.00), country: NL(-0.01), ip: 178.21.23.139(0.00)]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[development@lists.ipfire.org]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; DKIM_REPUTATION(0.00)[0]; ARC_SIGNED(0.00)[lists.ipfire.org:s=202003rsa:i=1]; ASN(0.00)[asn:50673, ipnet:178.21.23.0/24, country:NL]; RCVD_COUNT_THREE(0.00)[3]; RCPT_COUNT_TWO(0.00)[2]; DKIM_TRACE(0.00)[disroot.org:+]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_SOME(0.00)[] 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" - Update from version 6.0.6 to 6.0.16 - Update of rootfile not required - Changelog No substantial changes for Agent Linux version Changelogs since 6.0.6: - https://www.zabbix.com/rn/rn6.0.7 - https://www.zabbix.com/rn/rn6.0.8 - https://www.zabbix.com/rn/rn6.0.9 - https://www.zabbix.com/rn/rn6.0.10 - https://www.zabbix.com/rn/rn6.0.11 - https://www.zabbix.com/rn/rn6.0.12 - https://www.zabbix.com/rn/rn6.0.13 - https://www.zabbix.com/rn/rn6.0.14 - https://www.zabbix.com/rn/rn6.0.15 - https://www.zabbix.com/rn/rn6.0.16 Signed-off-by: Robin Roevens --- lfs/zabbix_agentd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lfs/zabbix_agentd b/lfs/zabbix_agentd index d7b5a4b37..45f7cec1f 100644 --- a/lfs/zabbix_agentd +++ b/lfs/zabbix_agentd @@ -26,7 +26,7 @@ include Config SUMMARY = Zabbix Agent -VER = 6.0.6 +VER = 6.0.16 THISAPP = zabbix-$(VER) DL_FILE = $(THISAPP).tar.gz @@ -34,7 +34,7 @@ DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) PROG = zabbix_agentd -PAK_VER = 6 +PAK_VER = 7 DEPS = fping @@ -48,7 +48,7 @@ objects = $(DL_FILE) $(DL_FILE) = $(DL_FROM)/$(DL_FILE) -$(DL_FILE)_BLAKE2 = f9d07ca8938ae4e5e47048c32872644caeda0ecdef17513c63c63d1ce2aaa4ac0c92e6c70932bc598ff908419dae05bab32924f5973a5528b5668f7c7c2c5a17 +$(DL_FILE)_BLAKE2 = 87f7c043f30ef9902b3673e2d444e37b32ef998d178fa5718ed9aa098f841f23237d79e54985ba3a415a86433a685387af33810f53a78837be6a1aa2870ed65a install : $(TARGET) From patchwork Tue Apr 18 18:45:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Roevens X-Patchwork-Id: 6795 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 4Q1CYG1Zkpz3xDh for ; Tue, 18 Apr 2023 18:45:54 +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 4Q1CY93j8Tz3kd; Tue, 18 Apr 2023 18:45:49 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4Q1CY853j7z30Js; Tue, 18 Apr 2023 18:45:48 +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) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4Q1CY65rq9z2ydF for ; Tue, 18 Apr 2023 18:45:46 +0000 (UTC) Received: from knopi.disroot.org (knopi.disroot.org [178.21.23.139]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPS id 4Q1CY52rNkzqt for ; Tue, 18 Apr 2023 18:45:45 +0000 (UTC) Authentication-Results: mail01.ipfire.org; dkim=pass header.d=disroot.org header.s=mail header.b=mAYjAElT; spf=pass (mail01.ipfire.org: domain of robin.roevens@disroot.org designates 178.21.23.139 as permitted sender) smtp.mailfrom=robin.roevens@disroot.org; dmarc=pass (policy=reject) header.from=disroot.org ARC-Seal: i=1; s=202003rsa; d=lists.ipfire.org; t=1681843546; a=rsa-sha256; cv=none; b=UTzIgBKmn+blmaBW+HmaJ5kxsHw/ooR1Cck5Sy5j0qMp7rp8XYIKXHdsIQ35HsQ2l4JUAE 5lmHapzbvUcV8Fw1pBnfoywBZQ94Cd2HbHqg8PwJtGeQtInl14zqh7QwJS+Z7d8NHYiC/v uzkkyBK2SrWDCC9eC+maVXtLz6FzhrRr6CTQ4cyt1ZtPZEg+9Sw3VymW/jBUR6Ji6gtNUm Vsju8AZIny1maS0qhxJci3Ah1nEG+piGbifht90XY1h0qVnvoD+JfyhT53XjS3WuEDH+2J F52rHv912Icxf7O9q9dFjZrW/t0R04dF72r1CERmoLdvNJbzoSu0TML5JY4UTA== ARC-Authentication-Results: i=1; mail01.ipfire.org; dkim=pass header.d=disroot.org header.s=mail header.b=mAYjAElT; spf=pass (mail01.ipfire.org: domain of robin.roevens@disroot.org designates 178.21.23.139 as permitted sender) smtp.mailfrom=robin.roevens@disroot.org; dmarc=pass (policy=reject) header.from=disroot.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.ipfire.org; s=202003rsa; t=1681843546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=kFk0kjzHcEKvatRn3p06iBwxotNcJMjVuohdfepB6qA=; b=gECEmScDx3KwO7hjymghUaJKoFuikN7+fHgQGH7xbbcirCSASHMBhKxEBjwcW9xitMGjYK JMy3jda0l7AYNbgNHoWlxZuldu1MJo6g716gUkzlwTLU/wGGDp/xUw4eFVryqSYatTWN5t 6y3kzH7matjlqEpKWdHJYitIfBqfLHJXjyCCqm0UyaUG9U5H6eXCJ6c/ItqsVQd6JbD7tP hEm/3YAagdSgZBHQnvxt1vhbUP3KxQBY6++EwyEfisW3oAvk+dFQhBy7qFjkyslnYuLkaU ZNXsgZgaQz482JIpm2i4KCw9kkF5ErxlZkaj46HIXJJl6Z0urVoyqvjHEyC1+Q== Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id CDE624060A for ; Tue, 18 Apr 2023 20:45:44 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id I9BS-XR4fpuI for ; Tue, 18 Apr 2023 20:45:43 +0200 (CEST) Received: from chojin.sicho.home (amaterasu.sicho.home [192.168.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (no client certificate requested) (Authenticated sender) by hachiman (MailScanner Milter) with SMTP id E6C94D0BCD; Tue, 18 Apr 2023 20:45:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1681843543; bh=WaLPTWvcPalWGlFCAxGIkAfUCyLlE7HndFoO9FX77ks=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=mAYjAElTeYBPNwDhcECWQ4m7U5fgtt1DuoRd9nwiuYJC9pTxxpnj54UNnhgg/Xl6Q uBWVAf8KvXqnmLonNXE57tk8INhiMbc/lItGFVuYZxG6ZnzEXr7Cm2/T9zQYhXR0gW mcBYBS0tsZSHTK9pdp93tLgSCTT3RMBEArUrjujL2roa/Q7CslddwwiD+HQf42llB9 mNYrv9g7b7+Q3mUzoPOVGha++0aqRjYd7rFq6isJHgjBekIotGqyTLdS5naSIBKA3R xg2ClzbtozymGEvds0zeTCJ3VX9Cq0qfYsHloH3joN/8xkFgfVZE36lOjjzL4NoMHO vH2zW6S4KILEw== From: Robin Roevens To: development@lists.ipfire.org Subject: [PATCH v2 2/3] Bugfix: compatibility with grep 3.8+ Date: Tue, 18 Apr 2023 20:45:11 +0200 Message-Id: <20230418184512.2235-3-robin.roevens@disroot.org> In-Reply-To: <20230418184512.2235-1-robin.roevens@disroot.org> References: <20230418184512.2235-1-robin.roevens@disroot.org> MIME-Version: 1.0 X-sicho-MailScanner-ID: E6C94D0BCD.A8A80 X-sicho-MailScanner: Found to be clean X-sicho-MailScanner-From: robin.roevens@disroot.org X-sicho-MailScanner-Watermark: 1682448326.99198@EqTUveyTA4DcHix6YZl3VA X-Rspamd-Action: no action X-Rspamd-Server: mail01.haj.ipfire.org X-Rspamd-Queue-Id: 4Q1CY52rNkzqt X-Spamd-Result: default: False [-1.66 / 11.00]; BAYES_HAM(-3.00)[99.99%]; SPF_REPUTATION_SPAM(1.86)[0.61852363191687]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM(-1.00)[-0.999]; DMARC_POLICY_ALLOW(-0.50)[disroot.org,reject]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[disroot.org:s=mail]; R_SPF_ALLOW(-0.20)[+a]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; IP_REPUTATION_HAM(-0.01)[asn: 50673(0.00), country: NL(-0.01), ip: 178.21.23.139(0.00)]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[development@lists.ipfire.org]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; DKIM_REPUTATION(0.00)[0]; ARC_SIGNED(0.00)[lists.ipfire.org:s=202003rsa:i=1]; ASN(0.00)[asn:50673, ipnet:178.21.23.0/24, country:NL]; RCVD_COUNT_THREE(0.00)[3]; RCPT_COUNT_TWO(0.00)[2]; DKIM_TRACE(0.00)[disroot.org:+]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_SOME(0.00)[] 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" Fix "grep: warning: stray \ before /" message on Zabbix Agent ipfire.net.fw.hits item introduced by grep 3.8 in https://git.ipfire.org/?p=ipfire-2.x.git;a=commit;h=40b5df3942149738529c22c9cfcd067cd672b605 Signed-off-by: Robin Roevens --- config/zabbix_agentd/userparameter_ipfire.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/zabbix_agentd/userparameter_ipfire.conf b/config/zabbix_agentd/userparameter_ipfire.conf index 10c09c25d..c5a636edf 100644 --- a/config/zabbix_agentd/userparameter_ipfire.conf +++ b/config/zabbix_agentd/userparameter_ipfire.conf @@ -5,7 +5,7 @@ UserParameter=ipfire.net.gateway.pingtime,sudo /usr/sbin/fping -c 3 gateway 2>&1 # Internet Gateway availability, can be used to check Internet connection UserParameter=ipfire.net.gateway.ping,sudo /usr/sbin/fping -q -r 3 gateway; [ ! $? ]; echo $? # Firewall Filter Forward chain drops in bytes/chain (JSON), can be used for discovery of firewall chains and monitoring of firewall hits on each chain -UserParameter=ipfire.net.fw.hits.raw,sudo /usr/local/bin/getipstat -xf | grep "\/\* DROP_.* \*\/$" | awk 'BEGIN { ORS = ""; print "["} { printf "%s{\"chain\": \"%s\", \"bytes\": \"%s\"}", separator, substr($11, 6), $2; separator = ", "; } END { print"]" }' +UserParameter=ipfire.net.fw.hits.raw,sudo /usr/local/bin/getipstat -xf | grep "/\* DROP_.* \*/$" | awk 'BEGIN { ORS = ""; print "["} { printf "%s{\"chain\": \"%s\", \"bytes\": \"%s\"}", separator, substr($11, 6), $2; separator = ", "; } END { print"]" }' # Number of currently Active DHCP leases UserParameter=ipfire.dhcpd.clients,grep -s -E 'lease|bind' /var/state/dhcp/dhcpd.leases | sed ':a;/{$/{N;s/\n//;ba}' | grep "state active" | wc -l # Number of Captive Portal clients From patchwork Tue Apr 18 18:45:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Roevens X-Patchwork-Id: 6794 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 4Q1CYF4QmXz3xGJ for ; Tue, 18 Apr 2023 18:45:53 +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 4Q1CY90VN5z9QV; Tue, 18 Apr 2023 18:45:49 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4Q1CY8420cz30J0; Tue, 18 Apr 2023 18:45:48 +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) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4Q1CY65j99z2xKQ for ; Tue, 18 Apr 2023 18:45:46 +0000 (UTC) Received: from knopi.disroot.org (knopi.disroot.org [178.21.23.139]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPS id 4Q1CY540Gpz2yc for ; Tue, 18 Apr 2023 18:45:45 +0000 (UTC) Authentication-Results: mail01.ipfire.org; dkim=pass header.d=disroot.org header.s=mail header.b="QrD7/aL7"; spf=pass (mail01.ipfire.org: domain of robin.roevens@disroot.org designates 178.21.23.139 as permitted sender) smtp.mailfrom=robin.roevens@disroot.org; dmarc=pass (policy=reject) header.from=disroot.org ARC-Seal: i=1; s=202003rsa; d=lists.ipfire.org; t=1681843546; a=rsa-sha256; cv=none; b=sv3YtoNUSWedLBkUVg2xW97kRB/aLaa5vt/vfs0cLREW42yfrzFP/0R4XFik1nBcJ/wmwd Cun6VG6vYLdcyhIe/md1Fca5+XWssN2O9iGZ/ml4R941vhZPtxOT4QJWn3nCIQbdP6CMys PevdVPe6E4jYTuxpZRxRcXBbHzQ0ABqXiXwWhE4vASTrI4SIyrYOr1JEGKnsC4M3oFX0Bx f6UsQV9YeCnwwihgj8NBqES1Aatg2PVliCxVh3Jj1JbBF9MdnHqbTSoWlnfiFI9gQuwl3+ reoSXVdgyJ1B3kdldD79uh7/30l/QdpTYWWVgwC5ENQ3fLQpmgtUxx86todxGg== ARC-Authentication-Results: i=1; mail01.ipfire.org; dkim=pass header.d=disroot.org header.s=mail header.b="QrD7/aL7"; spf=pass (mail01.ipfire.org: domain of robin.roevens@disroot.org designates 178.21.23.139 as permitted sender) smtp.mailfrom=robin.roevens@disroot.org; dmarc=pass (policy=reject) header.from=disroot.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.ipfire.org; s=202003rsa; t=1681843546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=qv5vK5fOqftwgK0GMvOFB/wLnQxH9Cyz54HYEcLbo4s=; b=wAij9loV+m9eBSi8OeGsOC2YSSeiBUg+8dczxEYb4+XptProVmZgUr3HiDYoQhUZRRqV67 WQ36KcfT2nIIGUoZHoGZ3jx4qp+VPgEwGlxb8wwCz7HaL7wy5T/ZgUZNnnB4zQunCze4Nn uKIDTKHfAQ1eE1ntGFY6CxWO+80X6d2gBNK+jXVBBApDcTXe/GXg5dXi4BA0YBL2W3pTRC P2JuQWP4OevCekGRaucADxMXYjvJJ+vehy3iofpu7e3Hio4XUVM1/RBKM7fB/3uzKvJn5q 1GE7R9IiGfq0lZjT4q4Q1i4pSheIw0bm7hzvBMxbCY0al3eGkXgHo+cOU9Xmkg== Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id D487140619 for ; Tue, 18 Apr 2023 20:45:44 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1Q0j-AJpAyFS for ; Tue, 18 Apr 2023 20:45:43 +0200 (CEST) Received: from chojin.sicho.home (amaterasu.sicho.home [192.168.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (no client certificate requested) (Authenticated sender) by hachiman (MailScanner Milter) with SMTP id F3F4BD0BD0; Tue, 18 Apr 2023 20:45:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1681843543; bh=TdUTZZNObIq5dVTvTZcBQzfh3A+KzWLTFP0OgPzQq/Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=QrD7/aL7GGVFvZBQIXrAC06K8ySfmlRjJ1/7GBiSHfxdGr/Rgi4PdxID+SUo4Q8Of zuOTDLhGiBEW1On0Uz51Ptt3GY/OVF1khtJ5l/0rEtcDHSv4qXwxIPPfcZkNIvruK2 DjRJzyJZJGG75zGx0ZlC76ZNfeyHukQvuaN7ZHu+ocKfYhHZW0bLUZ3JifxfBF+68e oAiTiQFATaN+TKfqsiHviFuDIe/R/NnLmq7Up15NORjwrN6CoKw6dKS3NXWOWFOVJZ 8uqkqWkrKQg0xwpjEa52vB2bJhAmIlJRXhK5pJZZBJqcvm0TJEZJQpVPXpGXnualYC z5RwXeG7nfOGA== From: Robin Roevens To: development@lists.ipfire.org Subject: [PATCH v2 3/3] Add Zabbix Agent to logviewer Date: Tue, 18 Apr 2023 20:45:12 +0200 Message-Id: <20230418184512.2235-4-robin.roevens@disroot.org> In-Reply-To: <20230418184512.2235-1-robin.roevens@disroot.org> References: <20230418184512.2235-1-robin.roevens@disroot.org> MIME-Version: 1.0 X-sicho-MailScanner-ID: F3F4BD0BD0.A8A80 X-sicho-MailScanner: Found to be clean X-sicho-MailScanner-From: robin.roevens@disroot.org X-sicho-MailScanner-Watermark: 1682448327.10004@+LN+6wMitQn1tML1R1L+vQ X-Rspamd-Action: no action X-Rspamd-Server: mail01.haj.ipfire.org X-Rspamd-Queue-Id: 4Q1CY540Gpz2yc X-Spamd-Result: default: False [-1.65 / 11.00]; BAYES_HAM(-3.00)[99.99%]; SPF_REPUTATION_SPAM(1.86)[0.61852363191687]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM(-0.99)[-0.992]; DMARC_POLICY_ALLOW(-0.50)[disroot.org,reject]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[disroot.org:s=mail]; R_SPF_ALLOW(-0.20)[+a]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; IP_REPUTATION_HAM(-0.01)[asn: 50673(0.00), country: NL(-0.01), ip: 178.21.23.139(0.00)]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[development@lists.ipfire.org]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; DKIM_REPUTATION(0.00)[0]; ARC_SIGNED(0.00)[lists.ipfire.org:s=202003rsa:i=1]; ASN(0.00)[asn:50673, ipnet:178.21.23.0/24, country:NL]; RCVD_COUNT_THREE(0.00)[3]; RCPT_COUNT_TWO(0.00)[2]; DKIM_TRACE(0.00)[disroot.org:+]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_SOME(0.00)[] 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" - Configure Zabbix Agent to log to syslog instead of its own logs. - Remove old zabbix log-dir and logrotate settings from rootfile, lfs and install-script. - Update log.dat to view Zabbix Agent logging from syslog. Signed-off-by: Robin Roevens --- config/rootfiles/packages/zabbix_agentd | 2 -- config/zabbix_agentd/logrotate | 9 --------- config/zabbix_agentd/zabbix_agentd_ipfire_mandatory.conf | 5 ++--- html/cgi-bin/logs.cgi/log.dat | 6 ++++-- lfs/zabbix_agentd | 9 --------- src/paks/zabbix_agentd/install.sh | 4 +--- 6 files changed, 7 insertions(+), 28 deletions(-) delete mode 100644 config/zabbix_agentd/logrotate diff --git a/config/rootfiles/packages/zabbix_agentd b/config/rootfiles/packages/zabbix_agentd index 6f2c831d7..729a47ac6 100644 --- a/config/rootfiles/packages/zabbix_agentd +++ b/config/rootfiles/packages/zabbix_agentd @@ -1,4 +1,3 @@ -etc/logrotate.d/zabbix_agentd etc/rc.d/init.d/zabbix_agentd etc/sudoers.d/zabbix_agentd etc/sudoers.d/zabbix_agentd_user @@ -21,4 +20,3 @@ var/ipfire/zabbix_agentd/zabbix_agentd_ipfire_mandatory.conf var/ipfire/zabbix_agentd/userparameters var/ipfire/zabbix_agentd/userparameters/userparameter_pakfire.conf var/ipfire/zabbix_agentd/userparameters/userparameter_ipfire.conf -#var/log/zabbix diff --git a/config/zabbix_agentd/logrotate b/config/zabbix_agentd/logrotate deleted file mode 100644 index 83bbca9fb..000000000 --- a/config/zabbix_agentd/logrotate +++ /dev/null @@ -1,9 +0,0 @@ -/var/log/zabbix/zabbix_agentd.log { - monthly - rotate 12 - compress - delaycompress - missingok - notifempty - create 0640 zabbix zabbix -} diff --git a/config/zabbix_agentd/zabbix_agentd_ipfire_mandatory.conf b/config/zabbix_agentd/zabbix_agentd_ipfire_mandatory.conf index c6be948be..f6580f3ba 100644 --- a/config/zabbix_agentd/zabbix_agentd_ipfire_mandatory.conf +++ b/config/zabbix_agentd/zabbix_agentd_ipfire_mandatory.conf @@ -1,8 +1,7 @@ PidFile=/var/run/zabbix/zabbix_agentd.pid -# Log rotation is managed by logrotate -LogFile=/var/log/zabbix/zabbix_agentd.log -LogFileSize=0 +# Logs go to syslog so it can be viewed in WUI logviewer +LogType=system # These paths are included in the IPFire backups. Do not put user modules # or configuration files in other locations if you want them included in the diff --git a/html/cgi-bin/logs.cgi/log.dat b/html/cgi-bin/logs.cgi/log.dat index 53b9073fc..01c382a0d 100644 --- a/html/cgi-bin/logs.cgi/log.dat +++ b/html/cgi-bin/logs.cgi/log.dat @@ -78,7 +78,8 @@ my %sections = ( 'ssh' => '(sshd(?:\(.*\))?\[.*\]: )', 'unbound' => '(unbound: \[.*?\])(.*:.*$)', 'urlfilter bl' => '(installpackage\[urlfilter\]: )', - 'wireless' => '(hostapd:|kernel: ath.*:|kernel: wifi[0-9]:)' + 'wireless' => '(hostapd:|kernel: ath.*:|kernel: wifi[0-9]:)', + 'zabbix_agentd' => '(zabbix_agentd\[.*?\]: )' ); # Translations for the %sections array. @@ -112,7 +113,8 @@ my %trsections = ( 'ssh' => 'SSH', 'unbound' => 'DNS: Unbound', 'urlfilter bl' => 'URLFilter Blacklist', - 'wireless' => 'Wireless' + 'wireless' => 'Wireless', + 'zabbix_agentd' => 'Zabbix Agent' ); diff --git a/lfs/zabbix_agentd b/lfs/zabbix_agentd index 45f7cec1f..4f2a8b5d8 100644 --- a/lfs/zabbix_agentd +++ b/lfs/zabbix_agentd @@ -114,10 +114,6 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) # Create directory for additional agent modules -mkdir -pv /usr/lib/zabbix - # Create directory for logging - -mkdir -pv /var/log/zabbix - chown zabbix.zabbix /var/log/zabbix - # Create directory for pid. -mkdir -pv /var/run/zabbix chown zabbix.zabbix /var/run/zabbix @@ -135,10 +131,5 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) install -v -m 644 $(DIR_SRC)/config/backup/includes/zabbix_agentd \ /var/ipfire/backup/addons/includes/zabbix_agentd - # Install include file for Logrotate - -mkdir -pv /etc/logrotate.d - install -v -m 644 $(DIR_SRC)/config/zabbix_agentd/logrotate \ - /etc/logrotate.d/zabbix_agentd - @rm -rf $(DIR_APP) @$(POSTBUILD) diff --git a/src/paks/zabbix_agentd/install.sh b/src/paks/zabbix_agentd/install.sh index 80632d1ec..e3f988c34 100644 --- a/src/paks/zabbix_agentd/install.sh +++ b/src/paks/zabbix_agentd/install.sh @@ -39,7 +39,6 @@ ln -sf ../init.d/zabbix_agentd /etc/rc.d/rc0.d/K02zabbix_agentd ln -sf ../init.d/zabbix_agentd /etc/rc.d/rc6.d/K02zabbix_agentd # Create additonal directories and set permissions -[ -d /var/log/zabbix ] || ( mkdir -pv /var/log/zabbix && chown zabbix.zabbix /var/log/zabbix ) [ -d /usr/lib/zabbix ] || ( mkdir -pv /usr/lib/zabbix && chown zabbix.zabbix /usr/lib/zabbix ) restore_backup ${NAME} @@ -66,8 +65,7 @@ grep -q "Include=/var/ipfire/zabbix_agentd/zabbix_agentd_ipfire_mandatory.conf" if [ $? -eq 1 ]; then # Remove settings that are now in our own config sed -i -e "\|^PidFile=.*$|d" /etc/zabbix_agentd/zabbix_agentd.conf - sed -i -e "\|^LogFile=.*$|d" /etc/zabbix_agentd/zabbix_agentd.conf - sed -i -e "\|^LogFileSize=.*$|d" /etc/zabbix_agentd/zabbix_agentd.conf + sed -i -e "\|^LogType=.*$|d" /etc/zabbix_agentd/zabbix_agentd.conf sed -i -e "\|^LoadModulePath=.*$|d" /etc/zabbix_agentd/zabbix_agentd.conf sed -i -e "\|^Include=/etc/zabbix_agentd/zabbix_agentd\.d/\*\.conf$|d" /etc/zabbix_agentd/zabbix_agentd.conf # Include our own config in main config