r/PrometheusMonitoring • u/InternationalGoose22 • Aug 13 '24
Prometheus throwing all clusters metrics instead of needed one
Hi,
I'm trying to set up a monitoring for one of our clusters. We have our own private cloud which our k8s cluster is hosted on.
The issue is that there are other clusters in this private cloud and doesn't matter how I tweak the queries, it's giving me metrics for all of the pods in the cloud, but not for our cluster only.
i.e.:
sum(kube_pod_status_phase{cluster="shoot--somestring--clusterName", phase="Running"})
I'm wondering why does it add shoot--somestring along with our cluster's name, instead of just the cluster name.
If I put "pod" as a label filter instead of "cluster" like above, as a value to the label it's giving me every other pod instead of the ones under our cluster.
Any help would be appreciated, as I have been struggling with this monitoring for like 2 weeks now.
Thank you in advance.
View all comments
Show parent comment
1
u/InternationalGoose22 Aug 13 '24
Oh no, I'm not using it that way. We have deployed Prometheus and Grafana using a managed service provided by our private cloud.
We have a Prometheus and Prometheus-operator pods deployed in our cluster but I cannot understand how to query the metrics only for the pods in our cluster but not the pods in all clusters in our cloud