From 2ad12c3b7e7f6f2159bec33105448e6114ffdfec Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 29 Aug 2021 22:41:57 +0200 Subject: prometheus: move blackbox job config to new setup --- inventory/host_vars/ch-mon.yml | 86 +++++++++--------------------------------- 1 file changed, 18 insertions(+), 68 deletions(-) (limited to 'inventory/host_vars') diff --git a/inventory/host_vars/ch-mon.yml b/inventory/host_vars/ch-mon.yml index 1a050b6a..7d8e334b 100644 --- a/inventory/host_vars/ch-mon.yml +++ b/inventory/host_vars/ch-mon.yml @@ -76,6 +76,24 @@ prometheus_exporter_blackbox_modules_extra: icmp: prober: icmp +prometheus_special_job_blackbox_ping: + - exporter_hostname: ch-mon + instance: "ping-magentagw" + address: 62.99.185.129 + - exporter_hostname: ch-mon + instance: "ping-quad9" + address: 9.9.9.9 + +prometheus_special_job_blackbox_https: + - exporter_hostname: ch-mon + instance: "https-web.chaos-at-home.org" + address: web.chaos-at-home.org + +prometheus_special_job_blackbox_ssh: + - exporter_hostname: ch-mon + instance: "ssh-{{ inventory_hostname }}" + address: "{{ network_zones.svc.prefix | ipaddr(network_zones.svc.offsets[inventory_hostname]) | ipaddr('address') }}:{{ ansible_port | default(22) }}" + promethues_alertmanager_smtp: smarthost: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets['ch-prometheus-legacy']) | ipaddr('address') }}:25" @@ -86,71 +104,3 @@ prometheus_alertmanager_web_route_prefix: /alertmanager/ grafana_secret_key: "{{ vault_grafana_secret_key }}" - -prometheus_server_jobs_extra: | - - job_name: 'ping' - metrics_path: /proxy - params: - module: - - blackbox - - icmp - scheme: https - tls_config: - ca_file: /etc/ssl/prometheus/ca-crt.pem - cert_file: /etc/ssl/prometheus/server/scrape-crt.pem - key_file: /etc/ssl/prometheus/server/scrape-key.pem - static_configs: - - targets: - - 62.99.185.129 - - 9.9.9.9 - relabel_configs: - - source_labels: [__address__] - target_label: __param_target - - source_labels: [__param_target] - target_label: instance - - target_label: __address__ - replacement: 192.168.32.230:9999 - - - job_name: 'https' - metrics_path: /proxy - params: - module: - - blackbox - - http_tls_2xx - scheme: https - tls_config: - ca_file: /etc/ssl/prometheus/ca-crt.pem - cert_file: /etc/ssl/prometheus/server/scrape-crt.pem - key_file: /etc/ssl/prometheus/server/scrape-key.pem - static_configs: - - targets: - - web.chaos-at-home.org - relabel_configs: - - source_labels: [__address__] - target_label: __param_target - - source_labels: [__param_target] - 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/scrape-crt.pem - key_file: /etc/ssl/prometheus/server/scrape-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