2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01: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
}