Commit Graph

9 Commits

Author SHA1 Message Date
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
Joe Adams 21a19ed252
Add pg_database collector
Converts the pg_database metrics from queries.yaml to a built in collector. This is enabled by default because it is not likely to be a performance problem and likely very useful data.

Signed-off-by: Joe Adams <github@joeadams.io>
2022-02-09 21:28:40 -05:00
SuperQ fcb2535aff
Release 0.10.1
* [BUGFIX] Fix broken log-level for values other than debug. #560

Signed-off-by: SuperQ <superq@gmail.com>
2022-01-14 17:27:06 +01:00
Joe Adams 7fdb019811
Bump date for release
Signed-off-by: Joe Adams <github@joeadams.io>
2021-07-08 09:16:57 -04:00
Joe Adams 08fd458df0
Update dependencies and fix tests
Signed-off-by: Joe Adams <github@joeadams.io>
2021-07-07 09:52:56 -04:00
Joe Adams 59623d5709
Release v0.10.0
Signed-off-by: Joe Adams <github@joeadams.io>
2021-07-06 21:36:32 -04:00
Ben Kochie 2e8928828c
Remove v from changelog tags
Attempt 2 to fixup CHANGELOG for promu release.

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-03-01 13:48:14 +01:00
Ben Kochie b0b1d7c8ba
Add dates to changelog entries
Fixes release publishing.

```bash
list=$(git tag | grep '^v' | sort -rV)
for v in $list ; do
  ts=$(git rev-list -n 1 --pretty --date=format:'%Y-%m-%d' $v | awk '$1 == "Date:" {print $2}')
  echo "## $v / $ts"
done
```

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-03-01 12:07:55 +01:00
Ben Kochie 41b2fcd17f
Release 0.9.0
* Add CHANGELOG from existing tags.

First release under the Prometheus Community organisation.

* [CHANGE] Update build to use standard Prometheus promu/Dockerfile
* [ENHANCEMENT] Remove duplicate column in queries.yml #433
* [ENHANCEMENT] Add query for 'pg_replication_slots' #465
* [ENHANCEMENT] Allow a custom prefix for metric namespace #387
* [ENHANCEMENT] Improve PostgreSQL replication lag detection #395
* [ENHANCEMENT] Support connstring syntax when discovering databases #473
* [ENHANCEMENT] Detect SIReadLock locks in the pg_locks metric #421
* [BUGFIX] Fix pg_database_size_bytes metric in queries.yaml #357
* [BUGFIX] Don't ignore errors in parseUserQueries #362
* [BUGFIX] Fix queries.yaml for AWS RDS #370
* [BUGFIX] Recover when connection cannot be established at startup #415
* [BUGFIX] Don't retry if an error occurs #426
* [BUGFIX] Do not panic on incorrect env #457

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-03-01 10:24:26 +01:00