|
|
|
@ -63,3 +63,26 @@ scrape_configs:
|
|
|
|
|
ca_file: '/etc/prometheus/ca.crt'
|
|
|
|
|
cert_file: '/etc/prometheus/prometheus-{{ lan_address }}.crt'
|
|
|
|
|
key_file: '/etc/prometheus/prometheus-{{ lan_address }}.key'
|
|
|
|
|
|
|
|
|
|
{% for target_type in ('https-internal', 'http-external-up', 'http-external-down') %}
|
|
|
|
|
- job_name: blackbox {{ target_type }}
|
|
|
|
|
metrics_path: /probe
|
|
|
|
|
params:
|
|
|
|
|
module: [http_2xx]
|
|
|
|
|
file_sd_configs:
|
|
|
|
|
- files:
|
|
|
|
|
- '/etc/prometheus/blackbox-{{ target_type }}-targets.json'
|
|
|
|
|
relabel_configs:
|
|
|
|
|
- source_labels: [__address__]
|
|
|
|
|
target_label: __param_target
|
|
|
|
|
- source_labels: [__param_target]
|
|
|
|
|
target_label: instance
|
|
|
|
|
- target_label: __address__
|
|
|
|
|
replacement: {{ lan_address }}:9115
|
|
|
|
|
scheme: https
|
|
|
|
|
tls_config:
|
|
|
|
|
ca_file: '/etc/prometheus/ca.crt'
|
|
|
|
|
cert_file: '/etc/prometheus/prometheus-{{ lan_address }}.crt'
|
|
|
|
|
key_file: '/etc/prometheus/prometheus-{{ lan_address }}.key'
|
|
|
|
|
|
|
|
|
|
{% endfor %}
|
|
|
|
|