Commit Graph

4 Commits

Author SHA1 Message Date
Nicolas Rodriguez
8855b7a604 Fix checkpoint_sync_time value type
Error:
sql: Scan error on column index 3, name \"checkpoint_sync_time\": converting driver.Value type float64 (\"1.876469e+06\") to a int: invalid syntax

See also:
https://github.com/prometheus-community/postgres_exporter/issues/633
https://github.com/prometheus-community/postgres_exporter/pull/666

Signed-off-by: Nicolas Rodriguez <nico@nicoladmin.fr>
2022-07-30 17:11:11 +02:00
bravosierrasierra
a627e7fce7
fix for exporter issue 633
fix for exporter issue 633: https://github.com/prometheus-community/postgres_exporter/issues/633

"Scan error on column index 2, name \"checkpoint_write_time\": converting driver.Value type float64 (\"6.594096e+06\") to a int: invalid syntax #633"

Signed-off-by: bravosierrasierra <bravosierrasierra@users.noreply.github.com>
2022-07-29 13:33:23 +03:00
Joe Adams
713461df98 WIP: Add prelim multi-target support
- Remove multi server support from new collector package
- Add http handler for multi-target support

Signed-off-by: Joe Adams <github@joeadams.io>
2022-07-28 10:19:32 -04:00
Joe Adams
27d23d02ef
refactor pg_stat_bgwriter metrics into standalone collector
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>
2022-02-22 21:46:43 -05:00