please ignore the yaml error -> 
... __address_,}

the trailing curly brace doesn't actually exist

2020年5月15日金曜日 16時50分03秒 UTC+9 Scott Mattan:
>
> I am having a problem with prometheus creating too many targets for a 
> specific job, and I cannot understand why I cannot get the correct number 
> of targets.
>
> I have the following scrape configuration.
>
> -
>             job_name: kubernetes-pods
>             kubernetes_sd_configs:
>                 - {role: pod}
>             relabel_configs:
>                 - {action: keep, regex: true, source_labels: [
> __meta_kubernetes_pod_annotation_prometheus_io_scrape]}
>                 - {action: replace, regex: (.+), source_labels: [
> __meta_kubernetes_pod_annotation_prometheus_io_path], target_label: 
> __metrics_path__}
>                 - {
>                      source_labels: [__address__, 
> __meta_kubernetes_pod_annotation_prometheus_io_port],
>                      action: replace, 
>                      regex: '([^:]+)(?::\d+)?;(\d+)', 
>                      replacement: '$1:$2', 
>                      target_label: __address__,}
>                   }
>                 - {action: labelmap, regex: __meta_kubernetes_pod_label_
> (.+)}
>                 - {action: replace, source_labels: [
> __meta_kubernetes_namespace], target_label: kubernetes_namespace}
>                 - {action: replace, source_labels: [
> __meta_kubernetes_pod_name], target_label: kubernetes_pod_name}
>                 - {regex: '(.*):.+', replacement: '${1}', source_labels: [
> __address__], target_label: instance}
>                 - {action: replace, source_labels: [
> __meta_kubernetes_pod_label_cassandra_rook_io_cluster], target_label: 
> cluster}
>                 - {action: replace, source_labels: [
> __meta_kubernetes_pod_label_cassandra_rook_io_datacenter], target_label: 
> dc}
>                 - {action: replace, source_labels: [
> __meta_kubernetes_pod_label_cassandra_rook_io_rack], target_label: rack}
>
> This job creates 24 targets from 3 pods with 8 ports each.  Each of the 
> pods have the following annotations.
>
>
>    - prometheus.io/scrape: true
>    
>
>    - prometheus.io/port: 9180
>    
>
> Due to the above config, shouldn't only one target each for a total of 3 
> targets be created?
> maybe I am understanding the role of `prometheus.io/port` 
> <http://prometheus.io/port> ?
>
> If anyone has any information on this I would be grateful
>

-- 
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/2587bcfc-e827-4148-82d0-4d3f79277e1f%40googlegroups.com.

Reply via email to