2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

postgresql_transactions: use DERIVE instead of COUNTER

This commit is contained in:
Lars Kruse 2018-06-10 13:54:35 +02:00
parent 97ab640be8
commit 93a567afbc

View File

@ -29,17 +29,17 @@ if [ "$1" = "config" ]; then
echo 'graph_category db' echo 'graph_category db'
echo 'graph_info Shows summarized commits and rollbacks in transactions on the PostgreSQL Server.' echo 'graph_info Shows summarized commits and rollbacks in transactions on the PostgreSQL Server.'
echo 'graph_title PostgreSQL Transactions' 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.label commits'
echo 'commits.min 0' echo 'commits.min 0'
echo 'commits.type COUNTER' echo 'commits.type DERIVE'
echo 'commits.info Number of transaction commits.' echo 'commits.info Number of transaction commits per second.'
echo 'rollbacks.label rollbacks' echo 'rollbacks.label rollbacks'
echo 'rollbacks.min 0' echo 'rollbacks.min 0'
echo 'rollbacks.type COUNTER' echo 'rollbacks.type DERIVE'
echo 'rollbacks.info Number of transaction rollbacks.' echo 'rollbacks.info Number of transaction rollbacks per second.'
exit 0 exit 0
fi 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 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