add cadvisor to prometheus server config
This commit is contained in:
		| @@ -355,3 +355,19 @@ scrape_configs: | |||||||
|         regex: '(.*):9323' |         regex: '(.*):9323' | ||||||
|         replacement: '${1}' |         replacement: '${1}' | ||||||
| {% endif %} | {% 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 %} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user