Grafana Dashboard results doubled due to 2 Prometheus replicas

  • What Grafana version and what operating system are you using?
    Grafana v10.0.3 on Kubernetes Cluster

  • What are you trying to achieve?
    Build a Dashboard with some basic information about the Cluster like Node count, Pod count…

  • How are you trying to achieve it?
    sum(cluster:master_nodes)

  • What happened?
    Showed 6 Master Nodes

  • What did you expect to happen?
    Showing 3 Master Nodes

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    I didnt receive any errors.

I looked into the query responses and saw that i get the same data from 2 Prometheus replicas. Is there an option to consolidate the data if its the same but from 2 replicas? I did some googling and found how to do it if you have 2 seperate datasources e.g. Prometheus and InfluxDb. but in my case it counts as 1 Datasource in grafana since its one Prometheus that hast 2 replicas due to HA.

Cheers
Marcel