mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
postgresql_transactions: configurable host and user
This commit is contained in:
parent
154cef14c5
commit
3c10c360cd
1 changed files with 3 additions and 3 deletions
|
@ -21,8 +21,8 @@
|
||||||
# Log info:
|
# Log info:
|
||||||
#
|
#
|
||||||
|
|
||||||
dbserver='localhost'
|
dbhost=${dbhost:-localhost}
|
||||||
dbuser='postgres'
|
dbuser=${dbuser:-postgres}
|
||||||
|
|
||||||
|
|
||||||
do_config() {
|
do_config() {
|
||||||
|
@ -45,7 +45,7 @@ do_config() {
|
||||||
|
|
||||||
|
|
||||||
do_fetch() {
|
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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue