1
0
Fork 0

Cleanup probes further

This commit is contained in:
Malte Brandy 2020-12-01 03:14:38 +01:00
parent 3aef9061ed
commit 60f071b327
No known key found for this signature in database
GPG key ID: 226A2D41EF5378C9

View file

@ -3,10 +3,10 @@ let
makeProbe = module: targets: { makeProbe = module: targets: {
job_name = "blackbox ${module}"; job_name = "blackbox ${module}";
metrics_path = "/probe"; metrics_path = "/probe";
params = { module = [ module ]; }; params.module = [ module ];
static_configs = [{ static_configs = [{
inherit targets; inherit targets;
labels = { alert_type = "infrastructure"; }; labels.alert_type = "infrastructure";
}]; }];
relabel_configs = [ relabel_configs = [
{ {
@ -30,11 +30,9 @@ let
}; };
in { in {
services.prometheus = { services.prometheus = {
exporters = { exporters.blackbox = {
blackbox = { enable = true;
enable = true; configFile = ./blackbox_rules.yml;
configFile = ./blackbox_rules.yml;
};
}; };
scrapeConfigs = [ scrapeConfigs = [
(makeProbe "tls_connect" [ "hera.m-0.eu:993" ]) (makeProbe "tls_connect" [ "hera.m-0.eu:993" ])
@ -43,11 +41,7 @@ in {
"bach.vocalensemble-darmstadt.de:25" "bach.vocalensemble-darmstadt.de:25"
"hera.m-0.eu:25" "hera.m-0.eu:25"
]) ])
(makeProbe "http" [ (makeProbe "http" [ "hera.m-0.eu:80" ])
"http://localhost:9090"
"http://localhost:9093"
"hera.m-0.eu:80"
])
(makeProbe "https" [ (makeProbe "https" [
"hera.m-0.eu:443" "hera.m-0.eu:443"
"https://blog.maralorn.de" "https://blog.maralorn.de"