started support for more then node exporter
This commit is contained in:
parent
246842b66e
commit
0494c4907a
4 changed files with 15 additions and 13 deletions
|
|
@ -1,11 +1,11 @@
|
|||
- job_name: prometheus-agent {{ inventory_hostname }}
|
||||
- job_name: "prometheus-agent - node-exporter : {{ inventory_hostname }}"
|
||||
scheme: https
|
||||
{% for i in ['scrape_timeout', 'scrape_interval'] if prometheus_agent[i] %}
|
||||
{{ i }}: {{ prometheus_agent[i] }}
|
||||
{% endfor %}
|
||||
static_configs:
|
||||
- targets:
|
||||
- {{ inventory_hostname }}:{{ prometheus_agent.scrapers[item] }}
|
||||
- {{ inventory_hostname }}:{{ prometheus_agent.scrapers[item].nodeexporter }}
|
||||
labels: {{ merged_prometheus_labels|to_json }}
|
||||
tls_config:
|
||||
ca_file: /etc/prometheus/targetcerts/{{ inventory_hostname }}.crt
|
||||
|
|
@ -15,5 +15,5 @@
|
|||
- source_labels: [__address__]
|
||||
regex: '([^:]+):\d+'
|
||||
target_label: instance
|
||||
- replacement: 'prometheus-agent'
|
||||
- replacement: 'node'
|
||||
target_label: job
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue