Initial commit

This commit is contained in:
nd 2020-05-22 14:47:25 +02:00
commit e42f1f6b9a
No known key found for this signature in database
GPG key ID: 21B5CD4DEE3670E9
7 changed files with 252 additions and 0 deletions

16
templates/node-scraper.j2 Normal file
View file

@ -0,0 +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