mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
postgresql_transactions: change from bash to sh; fix shellcheck issues
This commit is contained in:
parent
93a567afbc
commit
fdf6cea2b1
1 changed files with 2 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# Plugin to monitor PostgreSQL Commits and Rollbacks in Transactions
|
# Plugin to monitor PostgreSQL Commits and Rollbacks in Transactions
|
||||||
#
|
#
|
||||||
|
@ -42,4 +42,4 @@ if [ "$1" = "config" ]; then
|
||||||
echo 'rollbacks.info Number of transaction rollbacks per second.'
|
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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue