Sorting the Postgres cluster databases in the postgres collector (#11580)
Oleg Volchkov committed
Sep 28, 2021 at 13:53 UTC
3dec8d2e303656f741a45473044eb7454693d3a6
1 file changed
+2
-1
collectors/python.d.plugin/postgres/postgres.chart.py
+2
-1
@@ -455,7 +455,8 @@ FROM pg_stat_database
455
WHERE
456
has_database_privilege(
457
(SELECT current_user), datname, 'connect')
458
- AND NOT datname ~* '^template\d';
458
+ AND NOT datname ~* '^template\d'
459
+ORDER BY datname;
460
""",
461
}
462