cleaned up scraper config

This commit is contained in:
nd 2020-05-22 18:54:04 +02:00
parent e42f1f6b9a
commit c009ac013b
No known key found for this signature in database
GPG key ID: 21B5CD4DEE3670E9
2 changed files with 17 additions and 17 deletions

View file

@ -1,16 +1,16 @@
- job_name: prometheus-agent {{ inventory_hostname }}
scheme: https
static_configs:
- targets:
- {{ inventory_hostname }}:{{ prometheus_agent.scrapers[item] }}
labels: {{ merged_prometheus_labels|to_json }}
tls_config:
ca_file: /etc/prometheus/targetcerts/{{ inventory_hostname }}.crt
cert_file: /etc/ssl/prometheus_scraper.crt
key_file: /etc/ssl/private/prometheus_scraper.key
relabel_configs:
- source_labels: [__address__]
regex: '([^:]+):\d+'
target_label: instance
- replacement: 'prometheus-agent'
target_label: job
- job_name: prometheus-agent {{ inventory_hostname }}
scheme: https
static_configs:
- targets:
- {{ inventory_hostname }}:{{ prometheus_agent.scrapers[item] }}
labels: {{ merged_prometheus_labels|to_json }}
tls_config:
ca_file: /etc/prometheus/targetcerts/{{ inventory_hostname }}.crt
cert_file: /etc/ssl/prometheus_scraper.crt
key_file: /etc/ssl/private/prometheus_scraper.key
relabel_configs:
- source_labels: [__address__]
regex: '([^:]+):\d+'
target_label: instance
- replacement: 'prometheus-agent'
target_label: job