add conditions
This commit is contained in:
parent
00f9475cb2
commit
fa60f2f145
@ -161,6 +161,7 @@ scrape_configs:
|
|||||||
|
|
||||||
{% if prometheus_blackbox_exporter is defined %}
|
{% if prometheus_blackbox_exporter is defined %}
|
||||||
# blacbox #
|
# blacbox #
|
||||||
|
{% if prometheus_blackbox_exporter_http is defined %}
|
||||||
{% for target in prometheus_blackbox_exporter_http.values() %}
|
{% for target in prometheus_blackbox_exporter_http.values() %}
|
||||||
## http check ##
|
## http check ##
|
||||||
- job_name: blackbox - url {{ target }}
|
- job_name: blackbox - url {{ target }}
|
||||||
@ -180,6 +181,8 @@ scrape_configs:
|
|||||||
- target_label: __address__
|
- target_label: __address__
|
||||||
replacement: localhost:9115
|
replacement: localhost:9115
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
{% if prometheus_blackbox_exporter_ping is defined %}
|
||||||
{% for target in prometheus_blackbox_exporter_ping.values() %}
|
{% for target in prometheus_blackbox_exporter_ping.values() %}
|
||||||
## ping ##
|
## ping ##
|
||||||
- job_name: blackbox - ping {{ target }}
|
- job_name: blackbox - ping {{ target }}
|
||||||
@ -199,3 +202,4 @@ scrape_configs:
|
|||||||
replacement: localhost:9115
|
replacement: localhost:9115
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user