CloudNativePG cluster desired instances Prometheus metric

69 Views Asked by At

Is there a Prometheus metric that indicates how many instances is the desired state of a cluster? I couldn't find one. This becomes a problem when trying to create a PrometheusRule that identifies a CNPG cluster that has no running instances.

Traditionally, you would have a StatefulSet from which you could infer the target replicas, as opposed to the actual ready instances.

In the case of CNPG there are only pods, as the operator does not use Deployment or StagefulSet, but instead managed Pods directly.

And when Pods are offline there remains no data from PodMonitors to use in a PrometheusRule.

0

There are 0 best solutions below