From: Alexander Koch <ipfire@starkstromkonsument.de>
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 [thread overview]
Message-ID: <1556393206-17040-3-git-send-email-ipfire@starkstromkonsument.de> (raw)
In-Reply-To: <1556393206-17040-1-git-send-email-ipfire@starkstromkonsument.de>
[-- Attachment #1: Type: text/plain, Size: 2968 bytes --]
Ship the UserParameter for monitoring the status of pakfire for keeping track of available updates etc.
Signed-off-by: Alexander Koch <ipfire(a)starkstromkonsument.de>
---
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 <filename> 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: <path to command1>, <path to command2>
+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
--
2.7.4
prev parent reply other threads:[~2019-04-27 19:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-27 19:26 [PATCH 1/3] zabbix_agentd: update to 4.2.1 Alexander Koch
2019-04-27 19:26 ` [PATCH 2/3] Pakfire: Add new command line argument "status" Alexander Koch
2019-05-09 21:55 ` [PATCH] Pakfire: Add Core-Version to "status" Alexander Koch
2019-04-27 19:26 ` Alexander Koch [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1556393206-17040-3-git-send-email-ipfire@starkstromkonsument.de \
--to=ipfire@starkstromkonsument.de \
--cc=development@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox