We are thrilled to announce that the FINAL version of pgwatch2 v1.9 is now ready for your production environment! pgwatch provides a secure, open-source, flexible, self-contained PostgreSQL metrics monitoring/dashboarding solution. pgwatch2 v1.9 supports monitoring PG versions 9.0 to 14 out of the box. Upgrade, or install pgwatch today to see how fantastic it really is. Download it from Github.
pgwatch2 v1.9 – Feature Highlights
pgwatch supports monitoring PostgreSQL versions 9.0 to 14 out of the box
New Features
It has been a long time since our previous release. And even though pgwatch2 v1.9 is not considered a major upgrade, there are a lot of impressive changes.
First of all, we have a new maintainer for pgwatch2. That’s me, Pavlo Golub. I hope Kaarel Moppel, the author of pgwatch2, will still work on the project – but now without the extra burden of support and maintenance.
We’ve used the fresh Go v1.17 for all binaries and Docker images.
We now have full PostgreSQL v14 support and support for the latest Grafana v8 visualization solution. For those who still use the previous versions of Grafana, we also added support for v7 and v6 dashboards.
To improve our CI/CD experience and automate some tasks, we’ve introduced three GitHub Actions in a series of planned workflows:
Release
CodeQL analysis
Close Stale Issues and PRs
- The
Release
workflow will automatically build all artifacts, including Docker images, and publish the release.
CodeQL analysis
stands guard over code security. It will thoroughly investigate each pull request and each push.
It’s not a surprise that many issues are created for open-source projects which never get a follow-up contribution from the topic starter. We have enabled a Close Stale Issues and PRs
workflow to keep up with the continuous storm of new issues and PRs. It will mark issues and PRs with no activity as stale, and eventually close them.
We added many more cool features, like new gatherer options, e.g. --try-create-listed-exts-if-missing
. Or like new metrics for monitoring “wait_events”.
Performance
- We provided many code modifications to improve performance.
- Prometheus-mode monitoring is now one of the essential optimizations.
- We rewrote the gatherer code to skip tables without waiting for
AccessExclusiveLock
. - We’ve added a new
--min-db-size-mb
flag to ignore “empty” databases. It allows the gatherer to skip measures fetching for empty or for small-sized databases. - pgwatch2 v1.9 comes with fully redesigned connection pooling, which will hardly rely on
sqlx.DB
from now on. - Timeouts have been greatly increased for database and table size fetching – to 5min.
- Metric fetching was made less disruptive by setting a short
lock_timeout
. - The new
--no-helper-functions
parameter allows you to skip metric definitions which rely on helper functions. This mode makes working with managed instances more fluid, with fewer errors in logs. It uses the SU or superuser version of a metric immediately when available, and not after the first failed call. - The new
--emergency-pause-triggerfile
flag aims to quickly shut down collectors. The main idea of the feature is to quickly free monitored databases and networks of any extra “monitoring effect” load.
pgwatch2 v1.9 – Additional Features
You’ll find many other new features and improvements in pgwatch2 v1.9. Some may be more important to your use case than those highlighted above. For the latest documentation see here.
pgwatch2 v.19 – What’s Changed
- upgrade to Go 1.17, closes #440 by @pashagolub in #441
- Grafana updated to the latest version by @yanchenko-igor in #428
- bigger upstream merge batch by @kmoppel-cognite in #431
- Prometheus mode optimization by @kmoppel-cognite in #401
- metrics: add new metrics for the upcoming Postgres v14 release. by @kmoppel-cognite in #399
- metrics: also skip tables just waiting for AccessExclusiveLock by @eshkinkot in #404
- fix file descriptors leak, fix race conditions in opening and closing database pool by @eshkinkot in #411
- gatherer: improve variable expansion in YAML configs by @kmoppel-cognite in #414
- gatherer: add a new –min-db-size-mb flag to ignore empty DBs by @kmoppel-cognite in #402
- gatherer: full redesign of connection pooling, relying on
sqlx.DB
by @kmoppel-cognite in #418 - daemon: introduce a 5s connect timeout on opening Postgres connections by @kmoppel-cognite in #419
- add Aiven as a cloud provider offering managed PostgreSQL by @carobme in #421
- give possibility to add an extra container by @pmpetit in #429
- add
release
GitHub Action by @pashagolub in #437 - fix incorrect conversion between integer types, fixes #438 by @pashagolub in #439
- add docker job to the Release workflow, closes #446 by @pashagolub in #448
- improve release action for beta versions by @pashagolub in #450
- Gatherer: remove unused
port
parameter fromStartPrometheusExporter()
, fixes #407 by @pashagolub in #455 - add action to close Stale Issues and PRs by @pashagolub in #456
- make
stale
label lower cased by @pashagolub in #457 - fix CVE-2021-3121: “improper Input Validation in GoGo Protobuf” by @pashagolub in #467
- fix
get_table_bloat_approx_sql()
whentblpages = 0
, closes #464 by @pashagolub in #468
New Contributors
- @kmoppel-cognite made their first contribution in #401
- @carobme made their first contribution in #421
- @yanchenko-igor made their first contribution in #428
Full Changelog: v1.8.5...v1.9.0
See also our new blog about using pgwatch v1.9 with Google Cloud PostgreSQL!