Skip to content

Conversation

mrdotb
Copy link

@mrdotb mrdotb commented Aug 24, 2025

👋
#37

@jsilvela
Copy link

jsilvela commented Aug 25, 2025

Good catch @mrdotb . Huh, the upstream deprecation was quite draconian. And your fix, I think, will not work for 1.25
Might be helpful if you added instead of modifying? So, have a metrics point for in-tree backups, and one for plugin backups? Could that make sense?

@mrdotb mrdotb force-pushed the main branch 2 times, most recently from 121f6da to 3761c25 Compare August 25, 2025 09:17
@mrdotb
Copy link
Author

mrdotb commented Aug 25, 2025

@jsilvela
I updated it to use a union query and check both metrics. Since we want a MAX(value), this seems to be the best solution, as we need the latest data regardless of the backup strategy.

I tested on my grafana it seems to work properly.
image

@jsilvela
Copy link

Nice. You may want to have a more useful description in case it can serve as the commit message.

…ones

Add fallback support for new barman_cloud_cloudnative_pg_io_* metrics
while maintaining compatibility with existing cnpg_collector_* metrics.

Before: Only used cnpg_collector_* metrics
After: Uses union syntax to query both old and new metric endpoints

Signed-off-by: mrdotb <[email protected]>
@mrdotb
Copy link
Author

mrdotb commented Aug 25, 2025

I amended the commit with a bit more details.

@georgek
Copy link

georgek commented Aug 31, 2025

Presumably given the naming the upstream would expose different metrics for different backup plugins. It doesn't seem like a sustainable solution to keep adding names for all possible backup plugins. Would it better to have the backup metrics configurable via chart values?

@JordanP
Copy link

JordanP commented Sep 27, 2025

Would it better to have the backup metrics configurable via chart values?

It's very convenient that this dashboard is usable without Helm. The resource here
https://raw.githubusercontent.com/cloudnative-pg/grafana-dashboards/main/charts/cluster/grafana-dashboard.json is a valid JSON.

@flokoe
Copy link

flokoe commented Sep 29, 2025

Hi there,

Presumably given the naming the upstream would expose different metrics for different backup plugins.

Are there any indications this will happen in the near future? For now, the Barman Cloud plugin seems to be the only plugin mentioned in the docs.

If there are no technical or qualitative reasons to hold this back, I would prefer it if this could be merged instead of dwelling on hypotheticals. The dashboard has been effectively broken for two releases.

@mrdotb
Copy link
Author

mrdotb commented Sep 29, 2025

Meanwhile you can deploy the dashboard using my fork it's just a json.

---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
configMapGenerator:
  - name: cloudnative-pg-dashboard
    files:
      - cloudnative-pg-dashboard.json=https://raw.githubusercontent.com/mrdotb/grafana-dashboards/3761c25bc51faf58026e9a892890b58089d2ced8/charts/cluster/grafana-dashboard.json
generatorOptions:
  disableNameSuffixHash: true
  annotations:
    kustomize.toolkit.fluxcd.io/substitute: disabled
  labels:
    grafana_dashboard: "1"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants