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