mirror of https://github.com/prometheus/prometheus
KubernetesSD: Remove redundant defaults from example config
parent
2cca07381b
commit
645feba8cf
|
@ -28,12 +28,9 @@ scrape_configs:
|
||||||
regex: (?:apiserver|node)
|
regex: (?:apiserver|node)
|
||||||
- action: labelmap
|
- action: labelmap
|
||||||
regex: __meta_kubernetes_node_label_(.+)
|
regex: __meta_kubernetes_node_label_(.+)
|
||||||
replacement: $1
|
|
||||||
- source_labels: [__meta_kubernetes_role]
|
- source_labels: [__meta_kubernetes_role]
|
||||||
action: replace
|
action: replace
|
||||||
regex: (.+)
|
|
||||||
target_label: kubernetes_role
|
target_label: kubernetes_role
|
||||||
replacement: $1
|
|
||||||
|
|
||||||
# Scrape config for service endpoints.
|
# Scrape config for service endpoints.
|
||||||
#
|
#
|
||||||
|
@ -61,12 +58,9 @@ scrape_configs:
|
||||||
action: replace
|
action: replace
|
||||||
target_label: __scheme__
|
target_label: __scheme__
|
||||||
regex: (https?)
|
regex: (https?)
|
||||||
replacement: $1
|
|
||||||
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path]
|
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path]
|
||||||
action: replace
|
action: replace
|
||||||
target_label: __metrics_path__
|
target_label: __metrics_path__
|
||||||
regex: (.+)
|
|
||||||
replacement: $1
|
|
||||||
- source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port]
|
- source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port]
|
||||||
action: replace
|
action: replace
|
||||||
target_label: __address__
|
target_label: __address__
|
||||||
|
@ -74,22 +68,15 @@ scrape_configs:
|
||||||
replacement: $1:$2
|
replacement: $1:$2
|
||||||
- action: labelmap
|
- action: labelmap
|
||||||
regex: __meta_kubernetes_service_label_(.+)
|
regex: __meta_kubernetes_service_label_(.+)
|
||||||
replacement: $1
|
|
||||||
- source_labels: [__meta_kubernetes_role]
|
- source_labels: [__meta_kubernetes_role]
|
||||||
action: replace
|
action: replace
|
||||||
regex: (.+)
|
|
||||||
target_label: kubernetes_role
|
target_label: kubernetes_role
|
||||||
replacement: $1
|
|
||||||
- source_labels: [__meta_kubernetes_service_namespace]
|
- source_labels: [__meta_kubernetes_service_namespace]
|
||||||
action: replace
|
action: replace
|
||||||
regex: (.+)
|
|
||||||
target_label: kubernetes_namespace
|
target_label: kubernetes_namespace
|
||||||
replacement: $1
|
|
||||||
- source_labels: [__meta_kubernetes_service_name]
|
- source_labels: [__meta_kubernetes_service_name]
|
||||||
action: replace
|
action: replace
|
||||||
regex: (.+)
|
|
||||||
target_label: kubernetes_name
|
target_label: kubernetes_name
|
||||||
replacement: $1
|
|
||||||
|
|
||||||
# Example scrape config for probing services via the Blackbox Exporter.
|
# Example scrape config for probing services via the Blackbox Exporter.
|
||||||
#
|
#
|
||||||
|
@ -113,32 +100,21 @@ scrape_configs:
|
||||||
action: keep
|
action: keep
|
||||||
regex: service;true
|
regex: service;true
|
||||||
- source_labels: []
|
- source_labels: []
|
||||||
regex: .*
|
|
||||||
target_label: __address__
|
target_label: __address__
|
||||||
replacement: prom-blackbox.default.svc:9115
|
replacement: prom-blackbox.default.svc:9115
|
||||||
- source_labels: [__address__]
|
- source_labels: [__address__]
|
||||||
regex: (.*)(:80)?
|
regex: (.*)(:80)?
|
||||||
target_label: __param_target
|
target_label: __param_target
|
||||||
replacement: ${1}
|
|
||||||
- source_labels: [__param_target]
|
- source_labels: [__param_target]
|
||||||
regex: (.*)
|
|
||||||
target_label: instance
|
target_label: instance
|
||||||
replacement: ${1}
|
|
||||||
- action: labelmap
|
- action: labelmap
|
||||||
regex: __meta_kubernetes_service_label_(.+)
|
regex: __meta_kubernetes_service_label_(.+)
|
||||||
replacement: $1
|
|
||||||
- source_labels: [__meta_kubernetes_role]
|
- source_labels: [__meta_kubernetes_role]
|
||||||
action: replace
|
action: replace
|
||||||
regex: (.+)
|
|
||||||
target_label: kubernetes_role
|
target_label: kubernetes_role
|
||||||
replacement: $1
|
|
||||||
- source_labels: [__meta_kubernetes_service_namespace]
|
- source_labels: [__meta_kubernetes_service_namespace]
|
||||||
action: replace
|
action: replace
|
||||||
regex: (.+)
|
|
||||||
target_label: kubernetes_namespace
|
target_label: kubernetes_namespace
|
||||||
replacement: $1
|
|
||||||
- source_labels: [__meta_kubernetes_service_name]
|
- source_labels: [__meta_kubernetes_service_name]
|
||||||
action: replace
|
action: replace
|
||||||
regex: (.+)
|
|
||||||
target_label: kubernetes_name
|
target_label: kubernetes_name
|
||||||
replacement: $1
|
|
||||||
|
|
Loading…
Reference in New Issue