summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Volchkov <oleg@volchkov.net>2021-09-28 13:53:28 +0600
committerGitHub <noreply@github.com>2021-09-28 10:53:28 +0300
commit3dec8d2e303656f741a45473044eb7454693d3a6 (patch)
treee7d47b7ca80d99ab8b6f8acbe0ca0d4f37aeb0ac
parent767203fe3ee4011a32b11925640446b3ada8b606 (diff)
Sorting the Postgres cluster databases in the postgres collector (#11580)
-rw-r--r--collectors/python.d.plugin/postgres/postgres.chart.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/collectors/python.d.plugin/postgres/postgres.chart.py b/collectors/python.d.plugin/postgres/postgres.chart.py
index 6cc1c16535..4cc57ab1e0 100644
--- a/collectors/python.d.plugin/postgres/postgres.chart.py
+++ b/collectors/python.d.plugin/postgres/postgres.chart.py
@@ -455,7 +455,8 @@ FROM pg_stat_database
WHERE
has_database_privilege(
(SELECT current_user), datname, 'connect')
- AND NOT datname ~* '^template\d';
+ AND NOT datname ~* '^template\d'
+ORDER BY datname;
""",
}