[DPE-9534] fix(monitoring): add _total suffix to PostgreSQL counter metrics in Grafana dashboard#1484
Merged
marceloneppel merged 1 commit intomainfrom Feb 26, 2026
Merged
Conversation
…rafana dashboard Align metric names with Prometheus naming conventions by appending _total suffix to pg_stat_database counter metrics (tup_inserted, tup_updated, tup_deleted, tup_fetched, tup_returned, blks_hit, blks_read, conflicts, deadlocks, temp_bytes). Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1484 +/- ##
=======================================
Coverage 75.82% 75.82%
=======================================
Files 17 17
Lines 4430 4430
Branches 676 676
=======================================
Hits 3359 3359
Misses 838 838
Partials 233 233 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
carlcsaposs-canonical
approved these changes
Feb 26, 2026
taurus-forever
approved these changes
Feb 26, 2026
dragomirp
approved these changes
Feb 26, 2026
taurus-forever
added a commit
that referenced
this pull request
Apr 10, 2026
…ics in Grafana dashboard (#1484)" The reverted commit did fix COS Opentelemetry Collector compatibility for the cost of braking compatibility with Grafana Agents. To restore backward compatibility for already deployed COS productions with subbordinated grafana-agent we have to revert this commit and re-apply better approach compatible with both otel collector AND grafana agent (WIP): canonical/postgresql-k8s-operator#1285 (comment) We are planning the next stable release, therefor have to revert it now. This reverts commit 60b0fb8.
taurus-forever
added a commit
that referenced
this pull request
Apr 10, 2026
…ics in Grafana dashboard (#1484)" (#1607) The reverted commit did fix COS Opentelemetry Collector compatibility for the cost of braking compatibility with Grafana Agents. To restore backward compatibility for already deployed COS productions with subbordinated grafana-agent we have to revert this commit and re-apply better approach compatible with both otel collector AND grafana agent (WIP): canonical/postgresql-k8s-operator#1285 (comment) We are planning the next stable release, therefor have to revert it now. This reverts commit 60b0fb8.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Grafana metrics were missing the
_totalsuffix for read/write/update/delete counts and rates, cache hit rate, conflicts/deadlocks, transaction number, and temp file size queries. As a consequence, the default grafana dashboard for the charm was not showing data.Solution
Port of canonical/postgresql-k8s-operator#1285.
Align metric names with Prometheus naming conventions by appending
_totalsuffix to pg_stat_database counter metrics (tup_inserted, tup_updated, tup_deleted, tup_fetched, tup_returned, blks_hit, blks_read, conflicts, deadlocks, temp_bytes).Checklist