Initial commit
This commit is contained in:
commit
e42f1f6b9a
7 changed files with 252 additions and 0 deletions
16
templates/node-scraper.j2
Normal file
16
templates/node-scraper.j2
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue