mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
postgresql_transactions: use DERIVE instead of COUNTER
This commit is contained in:
parent
97ab640be8
commit
93a567afbc
1 changed files with 5 additions and 5 deletions
|
@ -29,17 +29,17 @@ if [ "$1" = "config" ]; then
|
|||
echo 'graph_category db'
|
||||
echo 'graph_info Shows summarized commits and rollbacks in transactions on the PostgreSQL Server.'
|
||||
echo 'graph_title PostgreSQL Transactions'
|
||||
echo 'graph_vlabel Number of Commits and Rollbacks'
|
||||
echo 'graph_vlabel Commits and Rollbacks per second'
|
||||
|
||||
echo 'commits.label commits'
|
||||
echo 'commits.min 0'
|
||||
echo 'commits.type COUNTER'
|
||||
echo 'commits.info Number of transaction commits.'
|
||||
echo 'commits.type DERIVE'
|
||||
echo 'commits.info Number of transaction commits per second.'
|
||||
|
||||
echo 'rollbacks.label rollbacks'
|
||||
echo 'rollbacks.min 0'
|
||||
echo 'rollbacks.type COUNTER'
|
||||
echo 'rollbacks.info Number of transaction rollbacks.'
|
||||
echo 'rollbacks.type DERIVE'
|
||||
echo 'rollbacks.info Number of transaction rollbacks per second.'
|
||||
exit 0
|
||||
fi
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue