public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
* [PATCH 0/1] zabbix_agentd: Add support for suricata metrics
@ 2026-07-31  8:49 Robin Roevens
  2026-07-31  8:49 ` [PATCH] " Robin Roevens
  0 siblings, 1 reply; 2+ messages in thread
From: Robin Roevens @ 2026-07-31  8:49 UTC (permalink / raw)
  To: development; +Cc: Robin Roevens

Hi all

This patch adds the ability for Zabbix to request the suricata counters
using suricatasc.

This patch is based on current next, so it may pose a merge-conflict
when applied together with the previously submitted patch "zabbix_agentd: 
Make kresd userparameter not ipfire specific" also based on current next as 
the same files are changed. In that case both changes can be safely accepted 
as both are independent and separate patches.

Regards
Robin

-- 
Dit bericht is gescanned op virussen en andere gevaarlijke
inhoud door MailScanner en lijkt schoon te zijn.



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] zabbix_agentd: Add support for suricata metrics
  2026-07-31  8:49 [PATCH 0/1] zabbix_agentd: Add support for suricata metrics Robin Roevens
@ 2026-07-31  8:49 ` Robin Roevens
  0 siblings, 0 replies; 2+ messages in thread
From: Robin Roevens @ 2026-07-31  8:49 UTC (permalink / raw)
  To: development; +Cc: Robin Roevens

Add new UserParameters:
 - suricata.counters.get: for retrieval of suricata counters using suricatasc.
  - suricata.version for retrieval of current suricata version using suricatasc
Add both suricatasc commands to sudoers for Zabbix agent to be able to query suricata.

Signed-off-by: Robin Roevens <robin.roevens@disroot.org>
---
 config/rootfiles/packages/zabbix_agentd          | 1 +
 config/zabbix_agentd/sudoers                     | 1 +
 config/zabbix_agentd/userparameter_suricata.conf | 3 +++
 lfs/zabbix_agentd                                | 2 ++
 4 files changed, 7 insertions(+)
 create mode 100644 config/zabbix_agentd/userparameter_suricata.conf

diff --git a/config/rootfiles/packages/zabbix_agentd b/config/rootfiles/packages/zabbix_agentd
index 7f1f39b64..d73d9a0f2 100644
--- a/config/rootfiles/packages/zabbix_agentd
+++ b/config/rootfiles/packages/zabbix_agentd
@@ -24,6 +24,7 @@ var/ipfire/zabbix_agentd/userparameters/userparameter_ovpn.conf
 var/ipfire/zabbix_agentd/userparameters/userparameter_gateway.conf
 var/ipfire/zabbix_agentd/userparameters/userparameter_wireguard.conf
 var/ipfire/zabbix_agentd/userparameters/userparameter_locationdb.conf
+var/ipfire/zabbix_agentd/userparameters/userparameter_suricata.conf
 var/ipfire/zabbix_agentd/scripts
 var/ipfire/zabbix_agentd/scripts/ipfire_certificate_detail.sh
 var/ipfire/zabbix_agentd/scripts/ipfire_services.pl
diff --git a/config/zabbix_agentd/sudoers b/config/zabbix_agentd/sudoers
index 13edfcce9..8669b0361 100644
--- a/config/zabbix_agentd/sudoers
+++ b/config/zabbix_agentd/sudoers
@@ -13,3 +13,4 @@ zabbix ALL=(ALL) NOPASSWD: /usr/local/bin/openvpnctrl rw log, /usr/local/bin/wir
 zabbix ALL=(ALL) NOPASSWD: /var/ipfire/zabbix_agentd/scripts/ipfire_certificate_detail.sh
 zabbix ALL=(ALL) NOPASSWD: /var/ipfire/zabbix_agentd/scripts/ipfire_services.pl
 zabbix ALL=(ALL) NOPASSWD: /usr/bin/curl -s --unix-socket /var/run/knot-resolver/kres-api.sock http\://localhost/metrics/json
+zabbix ALL=(ALL) NOPASSWD: /usr/bin/suricatasc --command=dump-counters, /usr/bin/suricatasc --command=version
\ No newline at end of file
diff --git a/config/zabbix_agentd/userparameter_suricata.conf b/config/zabbix_agentd/userparameter_suricata.conf
new file mode 100644
index 000000000..b8f8c5b98
--- /dev/null
+++ b/config/zabbix_agentd/userparameter_suricata.conf
@@ -0,0 +1,3 @@
+# Suricata statistics
+UserParameter=suricata.counters.get,sudo /usr/bin/suricatasc --command=dump-counters
+UserParameter=suricata.version,sudo /usr/bin/suricatasc --command=version
\ No newline at end of file
diff --git a/lfs/zabbix_agentd b/lfs/zabbix_agentd
index cbf4b246c..e696828b5 100644
--- a/lfs/zabbix_agentd
+++ b/lfs/zabbix_agentd
@@ -118,6 +118,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
 		/var/ipfire/zabbix_agentd/userparameters/userparameter_wireguard.conf
 	install -v -m 644 $(DIR_SRC)/config/zabbix_agentd/userparameter_locationdb.conf \
 		/var/ipfire/zabbix_agentd/userparameters/userparameter_locationdb.conf
+	install -v -m 644 $(DIR_SRC)/config/zabbix_agentd/userparameter_suricata.conf \
+		/var/ipfire/zabbix_agentd/userparameters/userparameter_suricata.conf
 
 	# Install IPFire-specific Zabbix Agent scripts
 	-mkdir -pv /var/ipfire/zabbix_agentd/scripts
-- 
2.55.0


-- 
Dit bericht is gescanned op virussen en andere gevaarlijke
inhoud door MailScanner en lijkt schoon te zijn.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-07-31  8:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-31  8:49 [PATCH 0/1] zabbix_agentd: Add support for suricata metrics Robin Roevens
2026-07-31  8:49 ` [PATCH] " Robin Roevens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox