You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the docs, I'm expecting to see 3 new backup metrics, instead of the old ones. However despite the fact that backup through plugin is configured and working, the metrics are not popping up. And the old metrics are no longer working of course. Now I'm a bit lost, is there a problem with my config?
The new backup metrics with the barman_cloud_cloudnative_pg_io_ prefix are implemented and should be exposed by the barman-cloud plugin, but there are a few common reasons they might not appear even if backups are working:
The metrics are exposed by the controller-manager pod (the plugin operator) via the /metrics endpoint (usually port 8443) in the system or cnpg-system namespace, not by the PostgreSQL pods or sidecars. Make sure your Prometheus is scraping the controller-manager-metrics-service in the correct namespace and on the right port and path /metrics.
If the ObjectStore status does not contain the expected serverName key (matching your plugin config), the metrics will return zero values. Double-check that the serverName in your plugin config matches the key in the ObjectStore's status.ServerRecoveryWindow field metrics.go.
After deploying or upgrading the plugin, you must restart the CloudNativePG operator (controller-manager) so it can detect and register the plugin. If you haven't done this, metrics may not appear even if everything else looks correct issue #655.
For S3-compatible storage, you may need to set AWS_REQUEST_CHECKSUM_CALCULATION and AWS_RESPONSE_CHECKSUM_VALIDATION to when_required in your ObjectStore's instanceSidecarConfiguration.env to avoid silent failures issue #655.
If all of the above are correct and you still don't see the metrics, check the logs for the controller-manager and plugin sidecar for errors related to metrics, registration, or ObjectStore access.
These replace the old cnpg_collector_* metrics, which are deprecated and no longer updated after migration to the plugin-based backup architecture observability.md.
If you check these areas and still have issues, sharing the output of kubectl get pods, kubectl get objectstore, and kubectl get service in the relevant namespace, along with relevant logs, will help pinpoint the problem.
@dosu Are you following the installation instructions on the Barman CNPG-I page? I have a feeling that something from the default kustomization.yaml is missing from the release manifest.yaml, but you're using some other instructions to install the plugin.
From looking at the release manifest.yaml I see no way that controller-manager-metrics-service will be created using the default installation instructions. In the kustomization.yaml I see mention of the metrics parts, but that's not in the release manifest.yaml.
Upgraded to the latest plugin version v0.10.0 via the Helm chart v0.4.0.
Restarted both CNPG operator pods and even the database pod for good measure. Still no metrics.
@kruton I've manually exposed the metrics endpoint that you are referring to in kustomization.yaml, and they are not related to the actual backups, but rather to the Go processes, garbage collection, etc.
@kruton I've manually exposed the metrics endpoint that you are referring to in kustomization.yaml, and they are not related to the actual backups, but rather to the Go processes, garbage collection, etc.
Yes, I think there is a bug here. I don't know what dosu was referring to. Dosu is a bot so it might just be an LLM hallucination.
I looked at this for a while, but my thought without knowing this code base is there is some bug in the detection of plugins for monitoring.
Since the enablePodMonitor is now deprecrated, are you sure that the resources is actually created? Previously the PodMonitor was created automatically but now it is no longer the case.
I also lost some hours on this issue before I understood correctly the documentation.
The metrics @kruton and @maxim-mityutko are talking about (Go processes and garbage collection) are the ones exposed directly by the barman-cloud plugin deployment. But the three barman_cloud_cloudnative* metrics are actually retrieved by the postgres Pods and exposeed through the Postgres Pods.
Can you check if you have the PodMonitor created and working correctly?
I'm using VictoriaMetrics, so it's VMPodScrape for me, but the monitoring is working and it had been working prior to Barman plugin migration as well. All the other metrics from the Postgres pods are coming in, with the exception of the 3 new metrics related specifically to Barman plugin.
Hi, for me is exactly the same barman_cloud_cloudnative_pg_io.* metrics are not shown. This is how i tested it to avoid PodMonitor issues.
Got the Primary DB Pod and created a port-forward. kubectl port-forward $(kubectl get po -o name -l cnpg.io/cluster=test-db,cnpg.io/instanceRole=primary) 9187
look for backup_timestamp: or barman_cloud_cloudnative_pg_io
$ curl -s http://localhost:9187/metrics | grep backup_timestamp
# HELP cnpg_collector_last_available_backup_timestamp The last available backup as a unix timestamp (Deprecated)
# TYPE cnpg_collector_last_available_backup_timestamp gauge
cnpg_collector_last_available_backup_timestamp 0
# HELP cnpg_collector_last_failed_backup_timestamp The last failed backup as a unix timestamp (Deprecated)
# TYPE cnpg_collector_last_failed_backup_timestamp gauge
cnpg_collector_last_failed_backup_timestamp 1.767964969e+09
$ curl -s http://localhost:9187/metrics | grep barman_cloud_cloudnative_pg_io
nothing
Im using already: plugin-barman-cloud:v0.10.0
It seems the plugin is not really exposing the metrics correctly. Additionally at least for me the Documentation is confusing. The Barman Cloud Plugin exposes the following metrics through the native Prometheus exporter of the instance manager for me this means, the metrics are being exposed on the barman-cloud-plugin operator/pod on the cnpg-system. I tried to look there also for metrics and did not found anything at least on port 9090.
I think I found the bug. This plugin lacks TYPE_INSTANCE_SIDECAR_INJECTION in its plugin capabilities which causes it not to be considered enabled. This is needed to have the metrics queried from the sidecar.
Why is it working for others? There is backward compatibility code that masks this problem if isWALArchiver is set to true. As the @maxim-mityutko config shows in the original report, that isWALArchiver: false is in the config. That's the same with my configuration. This may be why @jeremyalbrecht could see the metrics with the new versions of these packages.
Brilliant! Looks like you are on point! I've changed the setting for isWALArchiver = True. The metrics popped up immidiately, no need to even reboot the instance.
Activity
dosubot commentedon Dec 21, 2025
Hi @maxim-mityutko! I'm Dosu and I’m helping the plugin-barman-cloud team.
The new backup metrics with the
barman_cloud_cloudnative_pg_io_prefix are implemented and should be exposed by the barman-cloud plugin, but there are a few common reasons they might not appear even if backups are working:The metrics are exposed by the controller-manager pod (the plugin operator) via the
/metricsendpoint (usually port 8443) in thesystemorcnpg-systemnamespace, not by the PostgreSQL pods or sidecars. Make sure your Prometheus is scraping thecontroller-manager-metrics-servicein the correct namespace and on the right port and path/metrics.If the ObjectStore status does not contain the expected
serverNamekey (matching your plugin config), the metrics will return zero values. Double-check that theserverNamein your plugin config matches the key in the ObjectStore'sstatus.ServerRecoveryWindowfieldmetrics.go.After deploying or upgrading the plugin, you must restart the CloudNativePG operator (controller-manager) so it can detect and register the plugin. If you haven't done this, metrics may not appear even if everything else looks correct
issue #655.For S3-compatible storage, you may need to set
AWS_REQUEST_CHECKSUM_CALCULATIONandAWS_RESPONSE_CHECKSUM_VALIDATIONtowhen_requiredin your ObjectStore'sinstanceSidecarConfiguration.envto avoid silent failuresissue #655.If all of the above are correct and you still don't see the metrics, check the logs for the controller-manager and plugin sidecar for errors related to metrics, registration, or ObjectStore access.
The metrics you should see are:
barman_cloud_cloudnative_pg_io_last_failed_backup_timestampbarman_cloud_cloudnative_pg_io_last_available_backup_timestampbarman_cloud_cloudnative_pg_io_first_recoverability_pointThese replace the old
cnpg_collector_*metrics, which are deprecated and no longer updated after migration to the plugin-based backup architectureobservability.md.If you check these areas and still have issues, sharing the output of
kubectl get pods,kubectl get objectstore, andkubectl get servicein the relevant namespace, along with relevant logs, will help pinpoint the problem.To reply, just mention @dosu.
Share context across your team and agents. Try Dosu.
Kernald commentedon Dec 25, 2025
I've got the same issue. The metrics are exposed neither by the cloudnative-pg operator pod nor by the individual cluster pods.
kruton commentedon Dec 30, 2025
@dosu Are you following the installation instructions on the Barman CNPG-I page? I have a feeling that something from the default kustomization.yaml is missing from the release manifest.yaml, but you're using some other instructions to install the plugin.
From looking at the release
manifest.yamlI see no way thatcontroller-manager-metrics-servicewill be created using the default installation instructions. In thekustomization.yamlI see mention of the metrics parts, but that's not in the releasemanifest.yaml.Kernald commentedon Dec 30, 2025
As a data point, I'm using the
plugin-barman-cloudHelm chart v0.3.1.maxim-mityutko commentedon Jan 5, 2026
Upgraded to the latest plugin version v0.10.0 via the Helm chart v0.4.0.
Restarted both CNPG operator pods and even the database pod for good measure. Still no metrics.
@kruton I've manually exposed the metrics endpoint that you are referring to in kustomization.yaml, and they are not related to the actual backups, but rather to the Go processes, garbage collection, etc.
kruton commentedon Jan 6, 2026
Yes, I think there is a bug here. I don't know what dosu was referring to. Dosu is a bot so it might just be an LLM hallucination.
I looked at this for a while, but my thought without knowing this code base is there is some bug in the detection of plugins for monitoring.
jeremyalbrecht commentedon Jan 20, 2026
Hey,
Since the enablePodMonitor is now deprecrated, are you sure that the resources is actually created? Previously the PodMonitor was created automatically but now it is no longer the case.
I also lost some hours on this issue before I understood correctly the documentation.
The metrics @kruton and @maxim-mityutko are talking about (Go processes and garbage collection) are the ones exposed directly by the barman-cloud plugin deployment. But the three barman_cloud_cloudnative* metrics are actually retrieved by the postgres Pods and exposeed through the Postgres Pods.
Can you check if you have the PodMonitor created and working correctly?
maxim-mityutko commentedon Jan 20, 2026
I'm using VictoriaMetrics, so it's VMPodScrape for me, but the monitoring is working and it had been working prior to Barman plugin migration as well. All the other metrics from the Postgres pods are coming in, with the exception of the 3 new metrics related specifically to Barman plugin.
dcardozoo commentedon Jan 21, 2026
Hi, for me is exactly the same
barman_cloud_cloudnative_pg_io.*metrics are not shown. This is how i tested it to avoid PodMonitor issues.Got the Primary DB Pod and created a port-forward.
kubectl port-forward $(kubectl get po -o name -l cnpg.io/cluster=test-db,cnpg.io/instanceRole=primary) 9187look for backup_timestamp: or barman_cloud_cloudnative_pg_io
Im using already: plugin-barman-cloud:v0.10.0
It seems the plugin is not really exposing the metrics correctly. Additionally at least for me the Documentation is confusing.
The Barman Cloud Plugin exposes the following metrics through the native Prometheus exporter of the instance managerfor me this means, the metrics are being exposed on the barman-cloud-plugin operator/pod on the cnpg-system. I tried to look there also for metrics and did not found anything at least on port 9090.Selim-Oeksuez commentedon Mar 5, 2026
Hello, is there any progress?
kruton commentedon Mar 5, 2026
I think I found the bug. This plugin lacks
TYPE_INSTANCE_SIDECAR_INJECTIONin its plugin capabilities which causes it not to be considered enabled. This is needed to have the metrics queried from the sidecar.Why is it working for others? There is backward compatibility code that masks this problem if
isWALArchiveris set totrue. As the @maxim-mityutko config shows in the original report, thatisWALArchiver: falseis in the config. That's the same with my configuration. This may be why @jeremyalbrecht could see the metrics with the new versions of these packages.maxim-mityutko commentedon Mar 6, 2026
Brilliant! Looks like you are on point! I've changed the setting for
isWALArchiver = True. The metrics popped up immidiately, no need to even reboot the instance.kruton commentedon Mar 6, 2026
That's great. I think there's another bug where
isWALArchiveris ignored and plugins are always used to archive WAL files if they have the capability to do it.So you might as well enable
isWALArchivernow since it has no effect to set it tofalseother than to break metrics.maxim-mityutko commentedon Mar 6, 2026
Interesting, good find! The
cnpg.io/skipWalArchiving: enabledannotation on the Cluster is still respected, which is nice.fix(metrics): announce sidecar injection capability (#776)