zabbix_agentd: Add ovpn monitoring items

Added new IPFire specific monitoring capabilities to Zabbix Agent:
- ipfire.ovpn.clients.discovery: Discovery of configured ovpn
  clients. Returns a JSON array.
- ipfire.ovpn.statusreport.get: Parses and returns
  /var/run/ovpnserver.log in a JSON array

Since /var/run/ovpnserver.log is only readable by root, 'cat' of that
file is added to sudoers.d/zabbix_agentd.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Robin Roevens
2023-07-19 22:29:18 +02:00
committed by Michael Tremer
parent 19a8ad39ef
commit 62e2bf5b82
2 changed files with 8 additions and 2 deletions

View File

@@ -8,4 +8,4 @@
# To add more sudo rights to zabbix agent, you should modify the sudoers file zabbix_agentd_user
#
Defaults:zabbix !requiretty
zabbix ALL=(ALL) NOPASSWD: /opt/pakfire/pakfire status, /usr/sbin/fping, /usr/local/bin/getipstat
zabbix ALL=(ALL) NOPASSWD: /opt/pakfire/pakfire status, /usr/sbin/fping, /usr/local/bin/getipstat, /bin/cat /var/run/ovpnserver.log