From cf9371d64a06c6b918cc6477a99a63e267256e0d Mon Sep 17 00:00:00 2001 From: muppeth Date: Fri, 27 Oct 2023 11:59:51 +0200 Subject: [PATCH] update from main --- .../userparameter_container.conf.j2 | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/templates/etc/zabbix/zabbix_agent.d/userparameter_container.conf.j2 b/templates/etc/zabbix/zabbix_agent.d/userparameter_container.conf.j2 index 84017cb..6b5355d 100644 --- a/templates/etc/zabbix/zabbix_agent.d/userparameter_container.conf.j2 +++ b/templates/etc/zabbix/zabbix_agent.d/userparameter_container.conf.j2 @@ -55,14 +55,37 @@ UserParameter=dovecot.processes,ps -A |grep imap |wc -l # Lufi UserParameter=lufi[*],cat /tmp/lufi_stats | grep $1 | cut -d' ' -f2- {% endif %} + {% if item.name == 'privatebin' %} # PrivateBin UserParameter=privatebin[*],cat /tmp/bin_stats | grep $1 | cut -d' ' -f2- {% endif %} + {% if item.name == 'etherpad' %} # Etherpad UserParameter=etherpad[*],cat /tmp/pad_stats | grep $1 | cut -d' ' -f2- {% endif %} + +{% if item.name == 'forgejo' %} +# Forgejo +UserParameter=forgejo[*],cat /tmp/git_stats | grep $1 | cut -d' ' -f2- +{% endif %} + +{% if item.name == 'prosody' %} +# Prosody +UserParameter=prosody[*],cat /tmp/prosody_stats | grep $1 | cut -d' ' -f2- +{% endif %} + +{% if item.name == 'jitsi' %} +# Jitsi +UserParameter=jitsi[*],curl -s http://localhost:8888/stats | jq '$1' +{% endif %} + +{% if item.name == 'mumble' %} +# Mumble +UserParameter=mumble[*],cat /tmp/mumble_stats | grep $1 | cut -d' ' -f2- +{% endif %} + {% if item.name == 'mariadb' %} # Mariadb UserParameter=mysql.ping[*], mysqladmin -h"$1" -P"$2" ping @@ -73,6 +96,7 @@ UserParameter=mysql.dbsize[*], mysql -h"$1" -P"$2" -sN -e "SELECT COALESCE(SUM(D UserParameter=mysql.replication.discovery[*], mysql -h"$1" -P"$2" -sNX -e "show slave status" UserParameter=mysql.slave_status[*], mysql -h"$1" -P"$2" -sNX -e "show slave status" {% endif %} + {% if item.name == 'postgres' %} # Postgres UserParameter=pgsql.bgwriter[*], psql -qtAX postgresql://"$3":"$4"@"$1":"$2"/"$5" -f "/var/lib/zabbix/postgresql/pgsql.bgwriter.sql"