Rework the postgres_mixing dashboard to be more composable. The goal is for this to be more maintainable long term. I don't know jsonnet very well, but following other projects, this appears to be in line.
This replaces the postgres-overview.json dashboard with an overview.json dashboard with the same panels. While the dashboard does not match perfectly, it does include the same data but with the correct metrics.
Signed-off-by: Joe Adams <github@joeadams.io>
This moves the metrics that are queried from pg_stat_bgwriter into a dedicated collector instead of dynamically generating queries and metrics from a map. It renames some metrics including adding the `_total` suffix on all of the counters to match prometheus standards. This implementation uses QueryRowContext to allow for later addition of context for cancellation. From the Postgres documentation, it states that there is one line per WAL sender process, but it is unclear how to differentiate between them in any meaningful way. When querying the table, there is no column to identify the row, only metrics about bgwriter.
Signed-off-by: Joe Adams <github@joeadams.io>