On 2020-04-14 15:49, Veera wrote:
I try to scrape from a federation endpoint, which resides inside an
open shift cluster. The openshift-Prometheus-instance has two
replicas. I am getting the double amount of metrics, labeled with
"prometheus_replica=replica_0" and "prometheus_replica=replica_1".

I would be great, if I could filter the replicas in my scrape-config.


Rather than scraping each Prometheus server directly you want to use a loadbalancer/service so it only connects to one of the two

        * job_name: prometheus_openshift_prod
honor_labels: true
metrics_path: '/federate'
params:
'match[]':
- '{job="kube-state-metrics"}'
- '{job="kubelet"}'
- '{job="kube-controllers"}'
- '{job="apiserver"}'
- '{job="node-exporter"}'
- '{job="kubernetes-apiservers"}'
- '{name=~"job:.*"}'

I use Version 2.15.0
The problem is also described here:

openshift/telemeter#151 [1]

 --
You received this message because you are subscribed to the Google
Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/a5456e01-07ab-401c-9702-621474bcc837%40googlegroups.com
[2].


Links:
------
[1] https://github.com/openshift/telemeter/issues/151
[2]
https://groups.google.com/d/msgid/prometheus-users/a5456e01-07ab-401c-9702-621474bcc837%40googlegroups.com?utm_medium=email&utm_source=footer

--
Stuart Clark

--
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/19014f71def41d6e0f6a2c79e7f9f95d%40Jahingo.com.

Reply via email to