From patchwork Sun Apr 28 05:26:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Koch X-Patchwork-Id: 2221 Return-Path: Received: from mail01.ipfire.org (mail01.i.ipfire.org [172.28.1.200]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail01.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web07.i.ipfire.org (Postfix) with ESMTPS id 9FF1A85BD82 for ; Sat, 27 Apr 2019 20:27:01 +0100 (BST) Received: from mail01.i.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id 44s1Br2gCwz5Dw7y; Sat, 27 Apr 2019 20:27:00 +0100 (BST) Received: from nx107.node02.secure-mailgate.com (nx107.node02.secure-mailgate.com [192.162.87.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPS id 44s1Bn1DtDz5Dw7y for ; Sat, 27 Apr 2019 20:26:57 +0100 (BST) Received: from dehamd003.servertools24.de ([31.47.254.18]) by node02.secure-mailgate.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1hKSyH-0005c9-Rk for development@lists.ipfire.org; Sat, 27 Apr 2019 21:26:50 +0200 Received: from balthasar.starkstromlahn.spdns.org (dslb-002-205-032-234.002.205.pools.vodafone-ip.de [2.205.32.234]) by dehamd003.servertools24.de (Postfix) with ESMTPSA id C038E813F2 for ; Sat, 27 Apr 2019 21:26:42 +0200 (CEST) From: Alexander Koch To: development@lists.ipfire.org Subject: [PATCH 1/3] zabbix_agentd: update to 4.2.1 Date: Sat, 27 Apr 2019 21:26:44 +0200 Message-Id: <1556393206-17040-1-git-send-email-ipfire@starkstromkonsument.de> X-Mailer: git-send-email 2.7.4 X-Originating-IP: 31.47.254.18 X-SecureMailgate-Domain: dehamd003.servertools24.de X-SecureMailgate-Username: 31.47.254.18 X-SecureMailgate-Outgoing-Class: ham X-SecureMailgate-Outgoing-Evidence: Combined (0.02) X-Recommended-Action: accept X-Filter-ID: Mvzo4OR0dZXEDF/gcnlw0R4iIUvzjp5U0k+OHPPhRGapSDasLI4SayDByyq9LIhVFbmVw+v4cyjz N18w1qF/eUTNWdUk1Ol2OGx3IfrIJKywOmJyM1qr8uRnWBrbSAGDjJTO55kJBbv01x7dn2l3rPNh vhTXFC3uEZfNFh1aVkTnx8yeplRO3sLIqUlSH7OGSSOyfR6YD3X+OhyiA/0JsJOIWFXUh+IpRF9t B9BlKGgqiQyFiY4MkwUDnmHVPmga1ZaiAfhFga75MhfKBSHbA0dO1ihNTNoIY+uvgLsSnaWurJgD argkG9PATBdWslmXeBBXj/FLZHcMxTpe0TqFxea3RoZYudjXpS9urC5NEuzH9Rt64qK6xgEbUyz8 b+ZxKtxIULowMEFNxFnMw43xHnL8t5Sf00iCgTacju14zsbuddEhLZzucArTwFf/Rxyvc9yYGhUD 2hGyiZO+qkiw0xCAcWuOOohc3fM6Q9TCJMvXs2KsRjKrCowEavDwQuKoRWe/BLbgLK4nr64Lz0+T 5joF1cwbZEcJthebTJehPr1heyJUXnB99bIX9h11Era+W8XUES5zefmADtIua3Ur6eEiz00XkiFq q6ASUKX0g2JWgWWsfzmdEBxk/w4+z2XWmanWP/O3yn36OGbeLAxtTqTF8keq/maUXJolr6LNJ3Gy emmRUU4XinngJj/Ycp516QTJqE+gTD3LxkH8+rmQhCWb0WMvKEIqaiGxrQ9XnVcPUwgpFy4LeRiA Yk3Sh5L+g9gI+z7YmwUIQUXy1WNPC/PFg/2TMHL3jlu0UEfHKQOdDKRu5EcLafNyIMGZ2rQHY9m7 XuuGJ0IPPpgRxOPwjnVRyOX1z0WyreyZZ61b44N3K7sbcvfLVVW/NWRoQALFVNso2Q1Jiv5TUuMp WBEuNmGc+45UkkR7+Qos4inpA1N7LIVjwaWbNGYgA6dL4YRfk5tbQM9qeegCGHuKh3ZLPU7Mv6DX thHPMQjUBleczIM3oto0tveWGbkxfhWtKX3ek4SBLUeK4fGRQSE+/yr+DOUDCIIcKXYGfTVBO2Xo H5rxRIfd0bAuQbjqt+XCpWwAmE2owUB6yEduhvNKA0H0Sg== X-Report-Abuse-To: spam@node01.secure-mailgate.com Authentication-Results: mail01.ipfire.org; dkim=none; dmarc=none; spf=pass (mail01.ipfire.org: domain of ipfire@starkstromkonsument.de designates 192.162.87.107 as permitted sender) smtp.mailfrom=ipfire@starkstromkonsument.de X-Rspamd-Queue-Id: 44s1Bn1DtDz5Dw7y X-Spamd-Result: default: False [-6.70 / 11.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_XOIP(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:192.162.87.0/24]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[development@lists.ipfire.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_THREE(0.00)[3]; DMARC_NA(0.00)[starkstromkonsument.de]; MX_GOOD(-0.01)[mail.starkstromkonsument.de]; MID_CONTAINS_FROM(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[107.87.162.192.list.dnswl.org : 127.0.5.0]; NEURAL_HAM(-2.92)[-0.973,0]; IP_SCORE(-1.48)[ipnet: 192.162.84.0/22(-4.01), asn: 45031(-3.29), country: DE(-0.09)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:45031, ipnet:192.162.84.0/22, country:DE]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-3.00)[99.99%]; RECEIVED_SPAMHAUS_PBL(0.00)[234.32.205.2.zen.spamhaus.org : 127.0.0.11] X-Rspamd-Server: mail01.i.ipfire.org X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.15 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" Release notes: https://www.zabbix.com/rn/rn4.2.1 Signed-off-by: Alexander Koch --- lfs/zabbix_agentd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lfs/zabbix_agentd b/lfs/zabbix_agentd index 23b77b9..1dcf28c 100644 --- a/lfs/zabbix_agentd +++ b/lfs/zabbix_agentd @@ -24,7 +24,7 @@ include Config -VER = 4.2.0 +VER = 4.2.1 THISAPP = zabbix-$(VER) DL_FILE = $(THISAPP).tar.gz @@ -32,7 +32,7 @@ DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) PROG = zabbix_agentd -PAK_VER = 2 +PAK_VER = 3 DEPS = "" ############################################################################### @@ -43,7 +43,7 @@ objects = $(DL_FILE) $(DL_FILE) = $(DL_FROM)/$(DL_FILE) -$(DL_FILE)_MD5 = 20f261708f95787f3dbea3eab89f804d +$(DL_FILE)_MD5 = e55ba94060ba2548ae8a1c29fd7cb7dd install : $(TARGET) From patchwork Sun Apr 28 05:26:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Koch X-Patchwork-Id: 2222 Return-Path: Received: from mail01.ipfire.org (mail01.i.ipfire.org [172.28.1.200]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail01.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web07.i.ipfire.org (Postfix) with ESMTPS id 3013585BD82 for ; Sat, 27 Apr 2019 20:27:05 +0100 (BST) Received: from mail01.i.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id 44s1Bw53Tzz5Dw8G; Sat, 27 Apr 2019 20:27:04 +0100 (BST) Received: from nx109.node02.secure-mailgate.com (nx109.node02.secure-mailgate.com [192.162.87.109]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPS id 44s1Bn1Lv4z5Dw83 for ; Sat, 27 Apr 2019 20:26:57 +0100 (BST) Received: from dehamd003.servertools24.de ([31.47.254.18]) by node02.secure-mailgate.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1hKSyH-0005cH-TF for development@lists.ipfire.org; Sat, 27 Apr 2019 21:26:50 +0200 Received: from balthasar.starkstromlahn.spdns.org (dslb-002-205-032-234.002.205.pools.vodafone-ip.de [2.205.32.234]) by dehamd003.servertools24.de (Postfix) with ESMTPSA id 0469881A2D for ; Sat, 27 Apr 2019 21:26:42 +0200 (CEST) From: Alexander Koch To: development@lists.ipfire.org Subject: [PATCH 2/3] Pakfire: Add new command line argument "status" Date: Sat, 27 Apr 2019 21:26:45 +0200 Message-Id: <1556393206-17040-2-git-send-email-ipfire@starkstromkonsument.de> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556393206-17040-1-git-send-email-ipfire@starkstromkonsument.de> References: <1556393206-17040-1-git-send-email-ipfire@starkstromkonsument.de> X-Originating-IP: 31.47.254.18 X-SecureMailgate-Domain: dehamd003.servertools24.de X-SecureMailgate-Username: 31.47.254.18 X-SecureMailgate-Outgoing-Class: ham X-SecureMailgate-Outgoing-Evidence: Combined (0.06) X-Recommended-Action: accept X-Filter-ID: Mvzo4OR0dZXEDF/gcnlw0R4iIUvzjp5U0k+OHPPhRGapSDasLI4SayDByyq9LIhVqis3nKetXvr5 rys7Ab0TEkTNWdUk1Ol2OGx3IfrIJKywOmJyM1qr8uRnWBrbSAGDjJTO55kJBbv01x7dn2l3rPNh vhTXFC3uEZfNFh1aVkTnx8yeplRO3sLIqUlSH7OGdEElLL1keaq45d28NMZ485OIWFXUh+IpRF9t B9BlKGgqiQyFiY4MkwUDnmHVPmga1ZaiAfhFga75MhfKBSHbA0dO1ihNTNoIY+uvgLsSnaWurJgD argkG9PATBdWslmXeBBXj/FLZHcMxTpe0TqFxea3RoZYudjXpS9urC5NEuzH9Rt64qK6xgEbUyz8 b+ZxKtxIULowMEFNxFnMw43xHnL8t5Sf00iCgTacju14zsbuddEhLZzucArTwFf/Rxyvc9yYGhUD 2hGyiZO+qkiw0xCAcWuOOohc3fM6Q9TCJMvXs2KsRjKrCowEavDwQuKoRWe/BLbgLK4nr64Lz0+T 5joF1cwbZEcJthebTJehPr1heyJUXnB99bIX9h11Era+W8XUES5zefmADtIua3Ur6eEiz00XkiFq q6ASUKX0g2JWgWWsfzmdEBxk/w4+z2XWmanWP/O3yn36OGbeLAxtTqTF8keq/maUXJolr6LNJ3EK xp7h8VtEq65UhDIvOEEV6QTJqE+gTD3LxkH8+rmQhCWb0WMvKEIqaiGxrQ9XnVcPUwgpFy4LeRiA Yk3Sh5L+g9gI+z7YmwUIQUXy1WNPC/PFg/2TMHL3jlu0UEfHKQOdDKRu5EcLafNyIMGZ2rQHNA3F 8KWON6uPIkYuxrzltzzBp3cvGaUQljqW5SPqIJF3K7sbcvfLVVW/NWRoQALFVNso2Q1Jiv5TUuMp WBEuNmGc+45UkkR7+Qos4inpA1N7LIVjwaWbNGYgA6dL4YRfk5tbQM9qeegCGHuKh3ZLPU7Mv6DX thHPMQjUBleczIM3oto0tveWGbkxfhWtKX3ek4SBLUeK4fGRQSE+/yr+DOUDCIIcKXYGfTVBO2Xo H5rxRIfd0bAuQbjqt+XCpWwAmE2owUB6yEduhvNKA0H0Sg== X-Report-Abuse-To: spam@node01.secure-mailgate.com Authentication-Results: mail01.ipfire.org; dkim=none; dmarc=none; spf=pass (mail01.ipfire.org: domain of ipfire@starkstromkonsument.de designates 192.162.87.109 as permitted sender) smtp.mailfrom=ipfire@starkstromkonsument.de X-Rspamd-Queue-Id: 44s1Bn1Lv4z5Dw83 X-Spamd-Result: default: False [-6.71 / 11.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_XOIP(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:192.162.87.0/24]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[development@lists.ipfire.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_THREE(0.00)[3]; DMARC_NA(0.00)[starkstromkonsument.de]; MX_GOOD(-0.01)[mail.starkstromkonsument.de]; MID_CONTAINS_FROM(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[109.87.162.192.list.dnswl.org : 127.0.5.0]; NEURAL_HAM(-2.92)[-0.974,0]; IP_SCORE(-1.48)[ipnet: 192.162.84.0/22(-4.01), asn: 45031(-3.29), country: DE(-0.09)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:45031, ipnet:192.162.84.0/22, country:DE]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-3.00)[99.99%]; RECEIVED_SPAMHAUS_PBL(0.00)[234.32.205.2.zen.spamhaus.org : 127.0.0.11] X-Rspamd-Server: mail01.i.ipfire.org X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.15 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" This enables Pakfire to return a Status-Summary for the Current Core-Update-Level, time since last updates, the availability of a core-/packet-update and if a reboot is required to complete an update. This can be used by monitoring agents (e.g. zabbix_agentd) to monitor the update status of the IPFire device. Signed-off-by: Alexander Koch --- src/pakfire/lib/functions.pl | 52 ++++++++++++++++++++++++++++++++++++++++++++ src/pakfire/pakfire | 2 ++ 2 files changed, 54 insertions(+) diff --git a/src/pakfire/lib/functions.pl b/src/pakfire/lib/functions.pl index 12a405b..9ed911d 100644 --- a/src/pakfire/lib/functions.pl +++ b/src/pakfire/lib/functions.pl @@ -108,6 +108,7 @@ sub usage { &Pakfire::message(" - Contacts the servers for new lists of paks."); &Pakfire::message(" - Installs the latest version of all paks."); &Pakfire::message(" - Outputs a short list with all available paks."); + &Pakfire::message(" - Outputs a summary about available core upgrades, updates and a required reboot"); &Pakfire::message(""); &Pakfire::message(" Global options:"); &Pakfire::message(" --non-interactive --> Enables the non-interactive mode."); @@ -893,4 +894,55 @@ sub progress_bar { sprintf "$color{'lightgreen'}%-20s %7s |%-${width}s| %10s$color{'normal'}\r",$show_bfile, $progress, $char x (($width-1)*$got/$total). '>', beautifysize($got); } +sub updates_available { + # Get packets with updates available + my @upgradepaks = &Pakfire::dblist("upgrade", "noweb"); + + # Get the length of the returned array + my $updatecount = scalar @upgradepaks; + + return "$updatecount"; +} + +sub coreupdate_available { + eval(`grep "core_" $Conf::dbdir/lists/core-list.db`); + if ("$core_release" > "$Conf::core_mine") { + return "yes ($core_release)"; + } + else { + return "no"; + } +} + +sub reboot_required { + if ( -e "/var/run/need_reboot" ) { + return "yes"; + } + else { + return "no"; + } +} + +sub status { + # General info + my $return = "Core-Update-Level: $Conf::core_mine\n"; + $return .= "Last update: " . &General::age("/opt/pakfire/db/core/mine") . " ago\n"; + $return .= "Last core-list update: " . &General::age("/opt/pakfire/db/lists/core-list.db") . " ago\n"; + $return .= "Last server-list update: " . &General::age("/opt/pakfire/db/lists/server-list.db") . " ago\n"; + $return .= "Last packages-list update: " . &General::age("/opt/pakfire/db/lists/packages_list.db") . " ago\n"; + + # Get availability of core updates + $return .= "Core-Update available: " . &Pakfire::coreupdate_available() . "\n"; + + # Get availability of package updates + $return .= "Package-Updates available: " . &Pakfire::updates_available() . "\n"; + + # Test if reboot is required + $return .= "Reboot required: " . &Pakfire::reboot_required() . "\n"; + + # Return status text + print "$return"; + exit 1; +} + 1; diff --git a/src/pakfire/pakfire b/src/pakfire/pakfire index 041ba66..c69a8d3 100644 --- a/src/pakfire/pakfire +++ b/src/pakfire/pakfire @@ -322,6 +322,8 @@ } elsif ("$ARGV[1]" eq "upgrades") { system("rm -f /etc/fcron.daily/pakfire-upgrade"); } + } elsif ("$ARGV[0]" eq "status") { + &Pakfire::status; } else { &Pakfire::usage; } From patchwork Sun Apr 28 05:26:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Koch X-Patchwork-Id: 2223 Return-Path: Received: from mail01.ipfire.org (mail01.i.ipfire.org [172.28.1.200]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail01.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web07.i.ipfire.org (Postfix) with ESMTPS id C8E8785BD82 for ; Sat, 27 Apr 2019 20:27:08 +0100 (BST) Received: from mail01.i.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id 44s1C02fyPz5Dw87; Sat, 27 Apr 2019 20:27:08 +0100 (BST) Received: from nx102.node02.secure-mailgate.com (nx102.node02.secure-mailgate.com [192.162.87.102]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPS id 44s1Bn1Tx2z5Dw86 for ; Sat, 27 Apr 2019 20:26:57 +0100 (BST) Received: from dehamd003.servertools24.de ([31.47.254.18]) by node02.secure-mailgate.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1hKSyI-0005cd-5I for development@lists.ipfire.org; Sat, 27 Apr 2019 21:26:50 +0200 Received: from balthasar.starkstromlahn.spdns.org (dslb-002-205-032-234.002.205.pools.vodafone-ip.de [2.205.32.234]) by dehamd003.servertools24.de (Postfix) with ESMTPSA id 3C9DB82525 for ; Sat, 27 Apr 2019 21:26:43 +0200 (CEST) From: Alexander Koch To: development@lists.ipfire.org Subject: [PATCH 3/3] zabbix_agentd: Add UserParameter for Pakfire Status Date: Sat, 27 Apr 2019 21:26:46 +0200 Message-Id: <1556393206-17040-3-git-send-email-ipfire@starkstromkonsument.de> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556393206-17040-1-git-send-email-ipfire@starkstromkonsument.de> References: <1556393206-17040-1-git-send-email-ipfire@starkstromkonsument.de> X-Originating-IP: 31.47.254.18 X-SecureMailgate-Domain: dehamd003.servertools24.de X-SecureMailgate-Username: 31.47.254.18 X-SecureMailgate-Outgoing-Class: ham X-SecureMailgate-Outgoing-Evidence: Combined (0.04) X-Recommended-Action: accept X-Filter-ID: Mvzo4OR0dZXEDF/gcnlw0R4iIUvzjp5U0k+OHPPhRGapSDasLI4SayDByyq9LIhVFwc15FphU07J kWtdT+yXsETNWdUk1Ol2OGx3IfrIJKywOmJyM1qr8uRnWBrbSAGDjJTO55kJBbv01x7dn2l3rPNh vhTXFC3uEZfNFh1aVkTnx8yeplRO3sLIqUlSH7OGndtFp4+btpk/fkMmms90rJOIWFXUh+IpRF9t B9BlKGgqiQyFiY4MkwUDnmHVPmga1ZaiAfhFga75MhfKBSHbA0dO1ihNTNoIY+uvgLsSnaWurJgD argkG9PATBdWslmXeBBXj/FLZHcMxTpe0TqFxea3RoZYudjXpS9urC5NEuzH9Rt64qK6xgEbUyz8 b+ZxKtxIULowMEFNxFnMw43xHnL8t5Sf00iCgTacju14zsbuddEhLZzucArTwFf/Rxyvc9yYGhUD 2hGyiZO+qkiw0xCAcWuOOohc3fM6Q9TCJMvXs2KsRjKrCowEavDwQuKoRWe/BLbgLK4nr64Lz0+T 5joF1cwbZEcJthebTJehPr1heyJUXnB99bIX9h11Era+W8XUES5zefmADtIua3Ur6eEiz00XkiFq q6ASUKX0g2JWgWWsfzmdEBxk/w4+z2XWmanWP/O3yn36OGbeLAxtTqTF8keq/maUXJolr6LNJ3HN s4glNUhueWQDNCuARNF96QTJqE+gTD3LxkH8+rmQhCWb0WMvKEIqaiGxrQ9XnVcPUwgpFy4LeRiA Yk3Sh5L+g9gI+z7YmwUIQUXy1WNPC/PFg/2TMHL3jlu0UEfHKQOdDKRu5EcLafNyIMGZ2rQH3TvQ ELxN/+L+Inxy4DZWSyajirfxXfjh1RK+pvPpNmR3K7sbcvfLVVW/NWRoQALFVNso2Q1Jiv5TUuMp WBEuNmGc+45UkkR7+Qos4inpA1N7LIVjwaWbNGYgA6dL4YRfk5tbQM9qeegCGHuKh3ZLPU7Mv6DX thHPMQjUBleczIM3oto0tveWGbkxfhWtKX3ek4SBLUeK4fGRQSE+/yr+DOUDCIIcKXYGfTVBO2Xo H5rxRIfd0bAuQbjqt+XCpWwAmE2owUB6yEduhvNKA0H0Sg== X-Report-Abuse-To: spam@node01.secure-mailgate.com Authentication-Results: mail01.ipfire.org; dkim=none; dmarc=none; spf=pass (mail01.ipfire.org: domain of ipfire@starkstromkonsument.de designates 192.162.87.102 as permitted sender) smtp.mailfrom=ipfire@starkstromkonsument.de X-Rspamd-Queue-Id: 44s1Bn1Tx2z5Dw86 X-Spamd-Result: default: False [-6.71 / 11.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_XOIP(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:192.162.87.0/24]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[development@lists.ipfire.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_THREE(0.00)[3]; DMARC_NA(0.00)[starkstromkonsument.de]; MX_GOOD(-0.01)[mail.starkstromkonsument.de]; MID_CONTAINS_FROM(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[102.87.162.192.list.dnswl.org : 127.0.5.0]; NEURAL_HAM(-2.92)[-0.975,0]; IP_SCORE(-1.48)[ipnet: 192.162.84.0/22(-4.01), asn: 45031(-3.29), country: DE(-0.09)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:45031, ipnet:192.162.84.0/22, country:DE]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-3.00)[100.00%]; RECEIVED_SPAMHAUS_PBL(0.00)[234.32.205.2.zen.spamhaus.org : 127.0.0.11] X-Rspamd-Server: mail01.i.ipfire.org X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.15 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" Ship the UserParameter for monitoring the status of pakfire for keeping track of available updates etc. Signed-off-by: Alexander Koch --- config/rootfiles/packages/zabbix_agentd | 1 + config/zabbix_agentd/sudoers | 8 ++++---- config/zabbix_agentd/userparameter_pakfire.conf | 2 ++ lfs/zabbix_agentd | 2 ++ 4 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 config/zabbix_agentd/userparameter_pakfire.conf diff --git a/config/rootfiles/packages/zabbix_agentd b/config/rootfiles/packages/zabbix_agentd index eaecf26..4420bda 100644 --- a/config/rootfiles/packages/zabbix_agentd +++ b/config/rootfiles/packages/zabbix_agentd @@ -5,6 +5,7 @@ etc/zabbix_agentd etc/zabbix_agentd/scripts etc/zabbix_agentd/zabbix_agentd.conf etc/zabbix_agentd/zabbix_agentd.d +etc/zabbix_agentd/zabbix_agentd.d/userparameter_pakfire.conf usr/bin/zabbix_get usr/bin/zabbix_sender usr/lib/modules diff --git a/config/zabbix_agentd/sudoers b/config/zabbix_agentd/sudoers index f4e4321..1b362a4 100644 --- a/config/zabbix_agentd/sudoers +++ b/config/zabbix_agentd/sudoers @@ -8,10 +8,10 @@ # Some hints: # - It is strongly recommended to edit this file only using the visudo -f command. If you mess up this file, # you might end up locking yourself out of your system! -# - Append the full path to each command, using "," as separator. +# - Append the full path incl. parameters to each command, using "," as separator. # - Only add commands you really need. Zabbix should not have more rights than it has to. # -# Uncomment the following two lines and edit the example of commands to fit your needs: +# Append / edit the following list of commands to fit your needs: # -#Defaults:zabbix !requiretty -#zabbix ALL=(ALL) NOPASSWD: , +Defaults:zabbix !requiretty +zabbix ALL=(ALL) NOPASSWD: /opt/pakfire/pakfire status diff --git a/config/zabbix_agentd/userparameter_pakfire.conf b/config/zabbix_agentd/userparameter_pakfire.conf new file mode 100644 index 0000000..aa2e80f --- /dev/null +++ b/config/zabbix_agentd/userparameter_pakfire.conf @@ -0,0 +1,2 @@ +### Parameter for monitoring pakfire status +UserParameter=pakfire.status,sudo /opt/pakfire/pakfire status diff --git a/lfs/zabbix_agentd b/lfs/zabbix_agentd index 1dcf28c..d4d5a22 100644 --- a/lfs/zabbix_agentd +++ b/lfs/zabbix_agentd @@ -91,6 +91,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) -mkdir -pv /etc/zabbix_agentd/scripts install -v -m 644 $(DIR_SRC)/config/zabbix_agentd/zabbix_agentd.conf \ /etc/zabbix_agentd/zabbix_agentd.conf + install -v -m 644 $(DIR_SRC)/config/zabbix_agentd/userparameter_pakfire.conf \ + /etc/zabbix_agentd/zabbix_agentd.d/userparameter_pakfire.conf # Create directory for additional agent modules -mkdir -pv /usr/lib/zabbix