added mariadb and postgres user parameters
This commit is contained in:
parent
4956208d5e
commit
013f6a2ae5
1 changed files with 46 additions and 19 deletions
|
@ -55,35 +55,62 @@ 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 == 'framadate' %}
|
||||
# Framadate
|
||||
UserParameter=framadate[*],cat /tmp/framadate_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-
|
||||
{% if item.name == 'ethercalc' %}
|
||||
# Ethercalc
|
||||
UserParameter=ethercalc[*],cat /tmp/ethercalc_stats | grep $1 | cut -d' ' -f2-
|
||||
{% endif %}
|
||||
|
||||
{% if item.name == 'prosody' %}
|
||||
# Prosody
|
||||
UserParameter=prosody[*],cat /tmp/prosody_stats | grep $1 | cut -d' ' -f2-
|
||||
{% if item.name == 'mariadb' %}
|
||||
# Mariadb
|
||||
UserParameter=mysql.ping[*], mysqladmin -h"$1" -P"$2" ping
|
||||
UserParameter=mysql.get_status_variables[*], mysql -h"$1" -P"$2" -sNX -e "show global status"
|
||||
UserParameter=mysql.version[*], mysqladmin -s -h"$1" -P"$2" version
|
||||
UserParameter=mysql.db.discovery[*], mysql -h"$1" -P"$2" -sN -e "show databases"
|
||||
UserParameter=mysql.dbsize[*], mysql -h"$1" -P"$2" -sN -e "SELECT COALESCE(SUM(DATA_LENGTH + INDEX_LENGTH),0) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='$3'"
|
||||
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"
|
||||
|
||||
{% if item.name == 'jitsi' %}
|
||||
# Jitsi
|
||||
UserParameter=jitsi[*],curl -s http://localhost:8888/stats | jq '$1'
|
||||
UserParameter=pgsql.connections.sum[*], psql -qtAX postgresql://"$3":"$4"@"$1":"$2"/"$5" -f "/var/lib/zabbix/postgresql/pgsql.connections.sum.sql"
|
||||
UserParameter=pgsql.connections[*], psql -qtAX postgresql://"$3":"$4"@"$1":"$2"/"$5" -f "/var/lib/zabbix/postgresql/pgsql.connections.sql"
|
||||
UserParameter=pgsql.connections.prepared[*], psql -qtAX postgresql://"$3":"$4"@"$1":"$2"/"$5" -f "/var/lib/zabbix/postgresql/pgsql.connections.prepared.sql"
|
||||
|
||||
UserParameter=pgsql.dbstat.sum[*], psql -qtAX postgresql://"$3":"$4"@"$1":"$2"/"$5" -f "/var/lib/zabbix/postgresql/pgsql.dbstat.sum.sql"
|
||||
UserParameter=pgsql.dbstat[*], psql -qtAX postgresql://"$3":"$4"@"$1":"$2"/"$5" -f "/var/lib/zabbix/postgresql/pgsql.dbstat.sql"
|
||||
|
||||
UserParameter=pgsql.transactions[*], psql -qtAX postgresql://"$3":"$4"@"$1":"$2"/"$5" -f "/var/lib/zabbix/postgresql/pgsql.transactions.sql"
|
||||
UserParameter=pgsql.config.hash[*], psql -qtAX postgresql://"$3":"$4"@"$1":"$2"/"$5" -f "/var/lib/zabbix/postgresql/pgsql.config.hash.sql"
|
||||
UserParameter=pgsql.wal.stat[*], psql -qtAX postgresql://"$3":"$4"@"$1":"$2"/"$5" -f "/var/lib/zabbix/postgresql/pgsql.wal.stat.sql"
|
||||
UserParameter=pgsql.locks[*], psql -qtAX postgresql://"$3":"$4"@"$1":"$2"/"$5" -f "/var/lib/zabbix/postgresql/pgsql.locks.sql"
|
||||
UserParameter=pgsql.queries[*], psql -qtAX postgresql://"$3":"$4"@"$1":"$2"/"$5" -v tmax=$6 -f "/var/lib/zabbix/postgresql/pgsql.query.time.sql"
|
||||
UserParameter=pgsql.uptime[*], psql -qtAX postgresql://"$3":"$4"@"$1":"$2"/"$5" -f "/var/lib/zabbix/postgresql/pgsql.uptime.sql"
|
||||
UserParameter=pgsql.cache.hit[*], psql -qtAX postgresql://"$3":"$4"@"$1":"$2"/"$5" -f "/var/lib/zabbix/postgresql/pgsql.cache.hit.sql"
|
||||
UserParameter=pgsql.scans[*], psql -qtAX postgresql://"$3":"$4"@"$1":"$2"/"$5" -f "/var/lib/zabbix/postgresql/pgsql.scans.sql"
|
||||
UserParameter=pgsql.frozenxid[*], psql -qtAX postgresql://"$3":"$4"@"$1":"$2"/"$5" -f "/var/lib/zabbix/postgresql/pgsql.frozenxid.sql"
|
||||
|
||||
UserParameter=pgsql.discovery.db[*], psql -qtAX postgresql://"$3":"$4"@"$1":"$2"/"$5" -f "/var/lib/zabbix/postgresql/pgsql.discovery.db.sql"
|
||||
UserParameter=pgsql.db.size[*], psql -qtAX postgresql://"$3":"$4"@"$1":"$2"/"$5" -c "SELECT pg_database_size('$6')"
|
||||
UserParameter=pgsql.ping[*], pg_isready -h "$1" -p "$2"
|
||||
UserParameter=pgsql.ping.time[*], LANG=C.UTF-8 psql -qtAX postgresql://"$3":"$4"@"$1":"$2"/"$5" -f "/var/lib/zabbix/postgresql/pgsql.ping.time.sql"
|
||||
UserParameter=pgsql.version[*], psql -qtAX postgresql://"$3":"$4"@"$1":"$2"/"$5" -c "SELECT version();"
|
||||
|
||||
UserParameter=pgsql.replication.count[*], psql -qtAX postgresql://"$3":"$4"@"$1":"$2"/"$5" -c "SELECT count(*) FROM pg_stat_replication"
|
||||
UserParameter=pgsql.replication.recovery_role[*], psql -qtAX postgresql://"$3":"$4"@"$1":"$2"/"$5" -f "/var/lib/zabbix/postgresql/pgsql.replication.recovery_role.sql"
|
||||
UserParameter=pgsql.replication.lag.sec[*], psql -qtAX postgresql://"$3":"$4"@"$1":"$2"/"$5" -f "/var/lib/zabbix/postgresql/pgsql.replication.lag.sql"
|
||||
UserParameter=pgsql.replication.status[*], psql -qtAX postgresql://"$3":"$4"@"$1":"$2"/"$5" -f "/var/lib/zabbix/postgresql/pgsql.replication.status.sql"
|
||||
{% endif %}
|
||||
|
||||
{% if item.name == 'mumble' %}
|
||||
# Mumble
|
||||
UserParameter=mumble[*],cat /tmp/mumble_stats | grep $1 | cut -d' ' -f2-
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in a new issue