Closed rwarford closed 4 months ago
kube-prometheus-stack
by default only scrapes monitors that are labeled with it's release name. You can remove that behavior by setting:
prometheus:
prometheusSpec:
podMonitorSelectorNilUsesHelmValues: false
ruleSelectorNilUsesHelmValues: false
serviceMonitorSelectorNilUsesHelmValues: false
probeSelectorNilUsesHelmValues: false
Alternatively you can apply the required labels to the CNPG resources, but the former solution is better when having a centralized cluster monitoring.
In any way, verify that the corresponding CNPG ServiceMonitor
/PodMonitor
resources exist. If they do, look for problems on the Prometheus side.
kube-prometheus-stack
by default only scrapes monitors that are labeled with it's release name. You can remove that behavior by setting:prometheus: prometheusSpec: podMonitorSelectorNilUsesHelmValues: false ruleSelectorNilUsesHelmValues: false serviceMonitorSelectorNilUsesHelmValues: false probeSelectorNilUsesHelmValues: false
Alternatively you can apply the required labels to the CNPG resources, but the former solution is better when having a centralized cluster monitoring.
In any way, verify that the corresponding CNPG
ServiceMonitor
/PodMonitor
resources exist. If they do, look for problems on the Prometheus side.
Thank you for your reply but please note that I pointed out in the "What I've Tried" section that I used those settings and am still not getting any metrics. Also note that the cpng podMonitor is recognized by Prometheus.
@itay-grudev Could you take another look at this issue please? As I mentioned in the comment above I did have the options set that you recommended. I've added my PrometheusSpec to the original post.
I haven't done anything significant to the values files other than enable ingresses. I do get other metrics in Prometheus (node metrics for example).
From our perspective, the chart's responsibility ends at provisioning the appropriate resources. Debugging why the provisioned resources fail to be recognized by Prometheus falls outside of the assistance we have the capacity or will to provide.
That being said if you discover a genuine corner case that we haven't covered, feel free to open a new ticket.
Description of the issue
I have installed the Prometheus operator and CloudNativePG operator via ArgoCD but am not getting any cnpg*_ metrics in Prometheus.
Prometheus chart: kube-prometheus-stack, revision 58.7.2 CloudNativePG chart: cloudnative-pg, revision 0.21.2
What Happens:
What I Expect
I expect the CloudNativePG Grafana dashboard to be correctly populated and I expect to be able to browse cnpg metrics in the Prometheus UI.
What I've Tried
Configuration Data
Prometheus cnpg podMonitor job configuration:
Prometheus spec:
EDIT: Added Prometheus spec.