Commit 8485e2ff authored by ale's avatar ale

Add a blackbox probe for public HTTPS

parent 6e95949f
Pipeline #3363 passed with stage
in 4 minutes and 47 seconds
modules: modules:
# Healthcheck probe to use on internal targets.
http_health: http_health:
prober: http prober: http
timeout: 5s timeout: 5s
...@@ -13,6 +14,25 @@ modules: ...@@ -13,6 +14,25 @@ modules:
preferred_ip_protocol: ip4 preferred_ip_protocol: ip4
tls_config: tls_config:
ca_file: /etc/credentials/x509/prometheus/ca.pem ca_file: /etc/credentials/x509/prometheus/ca.pem
cert_file: /etc/credentials/x509/prometheus/client/cert.pem
key_file: /etc/credentials/x509/prometheus/client/private_key.pem
insecure_skip_verify: false
# HTTP probe for the main public website.
http_public:
prober: http
timeout: 5s
http:
valid_status_codes: [200, 301, 302, 307]
method: GET
headers:
Host: "www.{{ domain_public[0] }}"
fail_if_ssl: false
fail_if_not_ssl: true
preferred_ip_protocol: ip4
tls_config:
server_name: "www.{{ domain_public[0] }}"
ca_file: /etc/ssl/certs/ca-certificates.crt
insecure_skip_verify: false insecure_skip_verify: false
ping: ping:
......
...@@ -88,7 +88,7 @@ scrape_configs: ...@@ -88,7 +88,7 @@ scrape_configs:
{% endfor %} {% endfor %}
{# Blackbox prober configs: host targets (icmp) #} {# Blackbox probes #}
{% for prober_host in groups['prometheus']|sort %} {% for prober_host in groups['prometheus']|sort %}
- job_name: "prober_ping_{{ loop.index }}" - job_name: "prober_ping_{{ loop.index }}"
...@@ -120,7 +120,7 @@ scrape_configs: ...@@ -120,7 +120,7 @@ scrape_configs:
- job_name: "prober_https_{{ loop.index }}" - job_name: "prober_https_{{ loop.index }}"
metrics_path: "/probe" metrics_path: "/probe"
params: params:
module: [http_health] module: [http_public]
relabel_configs: relabel_configs:
- source_labels: [__address__] - source_labels: [__address__]
target_label: target target_label: target
...@@ -137,7 +137,7 @@ scrape_configs: ...@@ -137,7 +137,7 @@ scrape_configs:
static_configs: static_configs:
- targets: - targets:
{% for host in groups['frontend']|sort %} {% for host in groups['frontend']|sort %}
- "https://{{ host }}/healthcheck" - "https://{{ host }}/"
{% endfor %} {% endfor %}
labels: labels:
zone: public zone: public
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment