aboutsummaryrefslogtreecommitdiffstats
path: root/ansible/host_vars
diff options
context:
space:
mode:
authorGravatar shtlrs <[email protected]>2024-05-04 17:48:31 +0200
committerGravatar jchristgit <[email protected]>2024-05-06 13:37:59 +0200
commit29138efe3a47574e55f22a6d71b4ef1d038a67c5 (patch)
treecd9c683d94e52fae630fad602d96d289e6ad68f1 /ansible/host_vars
parentPerform fail2ban bans directly via nftables (diff)
install blackbox exporter as part of out monitoring stack
Diffstat (limited to 'ansible/host_vars')
-rw-r--r--ansible/host_vars/lovelace/prometheus.yml38
1 files changed, 38 insertions, 0 deletions
diff --git a/ansible/host_vars/lovelace/prometheus.yml b/ansible/host_vars/lovelace/prometheus.yml
index d148bf1..1e4ec40 100644
--- a/ansible/host_vars/lovelace/prometheus.yml
+++ b/ansible/host_vars/lovelace/prometheus.yml
@@ -35,3 +35,41 @@ prometheus_configuration:
# Scrape node exporters on all hosts
static_configs:
- targets: "{{ hostvars.values() | map(attribute='ansible_wg0.ipv4.address') | map('regex_replace', '^(.*)$', '\\1:9100') | list }}"
+
+ - job_name: blackbox-ssh
+ metrics_path: /probe
+ params:
+ module: [ssh_banner]
+
+ static_configs:
+ - targets:
+ - lovelace.box.pydis.wtf
+ - turing.box.pydis.wtf
+
+ relabel_configs:
+ # Ensure that the SSH port is included explicitly
+ - source_labels: [__address__]
+ regex: (.*?)(:.*)?
+ replacement: ${1}:22
+ target_label: __param_target
+
+ - source_labels: [__param_target]
+ target_label: instance
+
+ - target_label: __address__
+ replacement: localhost:9115
+
+ - job_name: blackbox-http
+ metrics_path: /probe
+ params:
+ module: [http_2xx]
+ static_configs:
+ - targets:
+ - https://pydis.wtf/
+ - https://cloud.native.is.fun.and.easy.pydis.wtf/
+ relabel_configs:
+ - source_labels: [__address__]
+ target_label: __param_target
+ - source_labels: [__param_target]
+ target_label: instance
+ - target_label: __address__