From 8bcf938a7b95536c66a34b043915615df489f243 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 3 Jun 2021 22:55:21 +0200 Subject: prometheus: fix blackbox exporter icmp probes --- .../prometheus/server/templates/prometheus.yml.j2 | 28 +++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'roles/monitoring/prometheus/server/templates') diff --git a/roles/monitoring/prometheus/server/templates/prometheus.yml.j2 b/roles/monitoring/prometheus/server/templates/prometheus.yml.j2 index eb77d6d1..5eb7c570 100644 --- a/roles/monitoring/prometheus/server/templates/prometheus.yml.j2 +++ b/roles/monitoring/prometheus/server/templates/prometheus.yml.j2 @@ -54,12 +54,12 @@ scrape_configs: - target_label: __address__ replacement: 192.168.32.230:9999 - - job_name: 'tcp_tls' + - job_name: 'https' metrics_path: /proxy params: module: - blackbox - - tcp_tls + - http_tls_2xx scheme: https tls_config: ca_file: /etc/ssl/prometheus/ca-crt.pem @@ -67,7 +67,7 @@ scrape_configs: key_file: /etc/ssl/prometheus/server/exporter-key.pem static_configs: - targets: - - web.chaos-at-home.org:443 + - web.chaos-at-home.org relabel_configs: - source_labels: [__address__] target_label: __param_target @@ -75,3 +75,25 @@ scrape_configs: target_label: instance - target_label: __address__ replacement: 192.168.32.230:9999 + + - job_name: 'ssh' + metrics_path: /proxy + params: + module: + - blackbox + - ssh_banner + scheme: https + tls_config: + ca_file: /etc/ssl/prometheus/ca-crt.pem + cert_file: /etc/ssl/prometheus/server/exporter-crt.pem + key_file: /etc/ssl/prometheus/server/exporter-key.pem + static_configs: + - targets: + - 192.168.32.230:222 + relabel_configs: + - source_labels: [__address__] + target_label: __param_target + - target_label: instance + replacement: 'ch-mon' + - target_label: __address__ + replacement: 192.168.32.230:9999 -- cgit v1.2.3