From ca73995c888906999e904481e01a8a0287b970d4 Mon Sep 17 00:00:00 2001 From: Alex Garel Date: Mon, 11 Dec 2023 14:32:28 +0100 Subject: [PATCH] feat: add icmp probing (ping) (#97) * feat: add icmp probing (ping) * feat: ping proxy1 and proxy2 --- configs/blackbox_exporter/config.yml | 5 +++++ configs/prometheus/config.yml | 27 +++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/configs/blackbox_exporter/config.yml b/configs/blackbox_exporter/config.yml index e59d189..1cd9f02 100644 --- a/configs/blackbox_exporter/config.yml +++ b/configs/blackbox_exporter/config.yml @@ -31,6 +31,11 @@ modules: insecure_skip_verify: false preferred_ip_protocol: "ip4" # defaults to "ip6" ip_protocol_fallback: false # no fallback to "ip6" + icmp: # aka ping + prober: icmp + timeout: 5s + icmp: + preferred_ip_protocol: "ip4" # http_post_2xx: # prober: http # timeout: 5s diff --git a/configs/prometheus/config.yml b/configs/prometheus/config.yml index 93d3ab0..f353a15 100644 --- a/configs/prometheus/config.yml +++ b/configs/prometheus/config.yml @@ -155,3 +155,30 @@ scrape_configs: - elasticsearch|http://10.1.0.203:9200/_cluster/health?wait_for_status=yellow&timeout=50s labels: env: org + - job_name: blackbox-exporter-icmp + metrics_path: /probe + scrape_interval: 60s + params: + module: [icmp_probe] + relabel_configs: + - source_labels: [__address__] + regex: ^([^|]+)\|(.+)$ # splits target by | and uses 2nd token as target for blackbox_exporter + replacement: ${2} + target_label: __param_target + - source_labels: [__address__] + regex: (.+)\|(.+) # splits target by | and uses 1st token as 'app' label + replacement: ${1} + target_label: app + - source_labels: [__param_target] + target_label: instance + - replacement: blackbox_exporter:9115 + target_label: __address__ + static_configs: + - targets: + - ovh1:ovh1.openfoodfacts.org + - proxy1_ovh:proxy1.openfoodfacts.org + - proxy2_free:proxy2.openfoodfacts.org + - ovh2:ovh2.openfoodfacts.org + - ovh3:ovh3.openfoodfacts.org + - off1:off1.openfoodfacts.org + - off2:off2.openfoodfacts.org