Drop '__meta_kubernetes_role' since we have role in the config

pull/1840/head
William Stewart 8 years ago
parent 599fafd2aa
commit f97cd29e47
No known key found for this signature in database
GPG Key ID: 29151CAF09687CD0

@ -62,14 +62,8 @@ scrape_configs:
role: node role: node
relabel_configs: relabel_configs:
- source_labels: [__meta_kubernetes_role]
action: keep
regex: (?:apiserver|node)
- action: labelmap - action: labelmap
regex: __meta_kubernetes_node_label_(.+) regex: __meta_kubernetes_node_label_(.+)
- source_labels: [__meta_kubernetes_role]
action: replace
target_label: kubernetes_role
# Scrape config for service endpoints. # Scrape config for service endpoints.
# #
@ -91,9 +85,9 @@ scrape_configs:
role: endpoint role: endpoint
relabel_configs: relabel_configs:
- source_labels: [__meta_kubernetes_role, __meta_kubernetes_service_annotation_prometheus_io_scrape] - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape]
action: keep action: keep
regex: endpoint;true regex: true
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme] - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme]
action: replace action: replace
target_label: __scheme__ target_label: __scheme__
@ -109,9 +103,6 @@ scrape_configs:
replacement: $1:$2 replacement: $1:$2
- action: labelmap - action: labelmap
regex: __meta_kubernetes_service_label_(.+) regex: __meta_kubernetes_service_label_(.+)
- source_labels: [__meta_kubernetes_role]
action: replace
target_label: kubernetes_role
- source_labels: [__meta_kubernetes_service_namespace] - source_labels: [__meta_kubernetes_service_namespace]
action: replace action: replace
target_label: kubernetes_namespace target_label: kubernetes_namespace
@ -138,9 +129,9 @@ scrape_configs:
role: service role: service
relabel_configs: relabel_configs:
- source_labels: [__meta_kubernetes_role, __meta_kubernetes_service_annotation_prometheus_io_probe] - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_probe]
action: keep action: keep
regex: service;true regex: true
- source_labels: [__address__] - source_labels: [__address__]
target_label: __param_target target_label: __param_target
- target_label: __address__ - target_label: __address__
@ -149,8 +140,6 @@ scrape_configs:
target_label: instance target_label: instance
- action: labelmap - action: labelmap
regex: __meta_kubernetes_service_label_(.+) regex: __meta_kubernetes_service_label_(.+)
- source_labels: [__meta_kubernetes_role]
target_label: kubernetes_role
- source_labels: [__meta_kubernetes_service_namespace] - source_labels: [__meta_kubernetes_service_namespace]
target_label: kubernetes_namespace target_label: kubernetes_namespace
- source_labels: [__meta_kubernetes_service_name] - source_labels: [__meta_kubernetes_service_name]
@ -172,9 +161,9 @@ scrape_configs:
role: pod role: pod
relabel_configs: relabel_configs:
- source_labels: [__meta_kubernetes_role, __meta_kubernetes_pod_annotation_prometheus_io_scrape] - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
action: keep action: keep
regex: pod;true regex: true
- source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port] - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
action: replace action: replace
regex: (.+):(?:\d+);(\d+) regex: (.+):(?:\d+);(\d+)

Loading…
Cancel
Save