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:
parent
154cef14c5
commit
3c10c360cd
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue