add cadvisor to prometheus server config
This commit is contained in:
parent
901f850093
commit
dab6c43169
@ -355,3 +355,19 @@ scrape_configs:
|
||||
regex: '(.*):9323'
|
||||
replacement: '${1}'
|
||||
{% endif %}
|
||||
|
||||
{% if prometheus_cadvisor_exporter_targets is defined %}
|
||||
# cadvisor #
|
||||
- job_name: cadvisor
|
||||
scrape_interval: 30s
|
||||
static_configs:
|
||||
- targets:
|
||||
{% for target in prometheus_cadvisor_exporter_targets %}
|
||||
- {{ target }}:8080
|
||||
{% endfor %}
|
||||
relabel_configs:
|
||||
- source_labels: [ __address__ ]
|
||||
target_label: instance
|
||||
regex: '(.*):8080'
|
||||
replacement: '${1}'
|
||||
{% endif %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user