* [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