Upgrade postgres-exporter in production
We noticed that the postgres_exporter
used in production is really outdated (2019) and should be upgraded.
@rhenchen.gitlab noted in this thread:
We deploy as default version 0.6.0 - https://ops.gitlab.net/gitlab-cookbooks/gitlab-exporters/-/blob/a61709767f286e0292cace1711d2761d1526edaf/attributes/postgres_exporter.rb#L8 - from Oct 31, 2019
The latest https://github.com/prometheus-community/postgres_exporter is already 0.15.0
The reason we came across this is because we noticed that we don't have a pg_database_size_bytes
metric, which a more up to date version of the exporter provides by default.
The intended action here is for us to upgrade to the latest version.
There are a few breaking changes / deprecated features in how custom queries are being fed into the exporter, so this likely also affects the chef cookbook we use to deploy it. This is in particular about how we inject custom queries (using queries.yaml.erb), although it looks like the latest version still supports injecting a query.yaml
file (but it was deprecated).