1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 10:39:53 +00:00

postgresql_transactions: configurable host and user

This commit is contained in:
Lars Kruse 2018-06-10 14:06:30 +02:00
parent 154cef14c5
commit 3c10c360cd

View file

@ -21,8 +21,8 @@
# Log info:
#
dbserver='localhost'
dbuser='postgres'
dbhost=${dbhost:-localhost}
dbuser=${dbuser:-postgres}
do_config() {
@ -45,7 +45,7 @@ do_config() {
do_fetch() {
psql -h "$dbserver" -U "$dbuser" -tc "SELECT 'commits.value '||SUM(xact_commit)::TEXT||E'\\nrollbacks.value '||SUM(xact_rollback)::TEXT FROM pg_stat_database;" --no-align
psql -h "$dbhost" -U "$dbuser" -tc "SELECT 'commits.value '||SUM(xact_commit)::TEXT||E'\\nrollbacks.value '||SUM(xact_rollback)::TEXT FROM pg_stat_database;" --no-align
}