From: Tom Hughes Date: Wed, 9 Nov 2022 15:19:13 +0000 (+0000) Subject: The pg_database metric is now builtin X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/06553c4fe5bcc235c4b854a36f46648c27b9f44c The pg_database metric is now builtin --- diff --git a/cookbooks/postgresql/templates/default/postgres_queries.yml.erb b/cookbooks/postgresql/templates/default/postgres_queries.yml.erb index f513b33e7..da8b7bbc9 100644 --- a/cookbooks/postgresql/templates/default/postgres_queries.yml.erb +++ b/cookbooks/postgresql/templates/default/postgres_queries.yml.erb @@ -123,21 +123,6 @@ pg_statio_user_tables: description: "Number of buffer hits in this table's TOAST table indexes (if any)" <% end -%> -pg_database: - query: "SELECT pg_database.oid AS datid, pg_database.datname, pg_database_size(pg_database.datname) AS size_bytes FROM pg_database" - master: true - cache_seconds: 30 - metrics: - - datid: - usage: "LABEL" - description: "ID of the database" - - datname: - usage: "LABEL" - description: "Name of the database" - - size_bytes: - usage: "GAUGE" - description: "Disk space used by the database" - pg_unfrozen_ids: query: "SELECT current_database() AS datname, max(age(relfrozenxid)) AS xid_age, max(mxid_age(relminmxid)) AS mxid_age FROM pg_class WHERE relkind IN ('r', 'm')" metrics: