mirror of
https://github.com/nold360/hive-apps
synced 2024-12-22 13:01:21 +00:00
fix(prometheus): scrape config
This commit is contained in:
parent
94da509790
commit
189f661fea
1 changed files with 39 additions and 39 deletions
|
@ -1627,45 +1627,45 @@ prometheus:
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets: ['esplant.lan:80']
|
- targets: ['esplant.lan:80']
|
||||||
|
|
||||||
- job_name: 'kubernetes-services'
|
# - job_name: 'kubernetes-services'
|
||||||
scrape_interval: 120s
|
# scrape_interval: 120s
|
||||||
kubernetes_sd_configs:
|
# kubernetes_sd_configs:
|
||||||
- role: service
|
# - role: service
|
||||||
relabel_configs:
|
# relabel_configs:
|
||||||
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape]
|
# - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape]
|
||||||
action: keep
|
# action: keep
|
||||||
regex: true
|
# regex: true
|
||||||
- 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: (.+)
|
# regex: (.+)
|
||||||
- source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port]
|
# - source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port]
|
||||||
action: replace
|
# action: replace
|
||||||
regex: ([^:]+)(?::\d+)?;(\d+)
|
# regex: ([^:]+)(?::\d+)?;(\d+)
|
||||||
replacement: $1:$2
|
# replacement: $1:$2
|
||||||
target_label: __address__
|
# target_label: __address__
|
||||||
- action: labelmap
|
# - action: labelmap
|
||||||
regex: __meta_kubernetes_service_label_(.+)
|
# regex: __meta_kubernetes_service_label_(.+)
|
||||||
- source_labels: [__meta_kubernetes_namespace]
|
# - source_labels: [__meta_kubernetes_namespace]
|
||||||
action: replace
|
# action: replace
|
||||||
target_label: kubernetes_namespace
|
# target_label: kubernetes_namespace
|
||||||
- source_labels: [__meta_kubernetes_service_name]
|
# - source_labels: [__meta_kubernetes_service_name]
|
||||||
action: replace
|
# action: replace
|
||||||
target_label: kubernetes_service_name
|
# target_label: kubernetes_service_name
|
||||||
|
#
|
||||||
- job_name: 'kubernetes-pods'
|
# - job_name: 'kubernetes-pods'
|
||||||
scrape_interval: 120s
|
# scrape_interval: 120s
|
||||||
kubernetes_sd_configs:
|
# kubernetes_sd_configs:
|
||||||
- role: pod
|
# - role: pod
|
||||||
relabel_configs:
|
# relabel_configs:
|
||||||
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
|
# - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
|
||||||
action: keep
|
# action: keep
|
||||||
regex: true
|
# regex: true
|
||||||
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path]
|
# - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path]
|
||||||
action: replace
|
# action: replace
|
||||||
target_label: __metrics_path__
|
# target_label: __metrics_path__
|
||||||
regex: (.+)
|
# regex: (.+)
|
||||||
- source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
|
# - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
|
||||||
- job_name: 'kubernetes-services'
|
- job_name: 'kubernetes-services'
|
||||||
scrape_interval: 120s
|
scrape_interval: 120s
|
||||||
kubernetes_sd_configs:
|
kubernetes_sd_configs:
|
||||||
|
|
Loading…
Reference in a new issue