1
0

hosts/monitoring-3: move to blackbox monitoring

This commit is contained in:
2022-10-31 22:54:06 +01:00
parent eefd8af665
commit be5b1c1baf
4 changed files with 117 additions and 24 deletions

View File

@@ -22,6 +22,7 @@ in
description = "Public Key of the monitoring wireguard interface of this host";
};
bird = mkEnableOption "Monitor bird";
blackbox = mkEnableOption "Monitor blackbox";
};
};
@@ -54,5 +55,24 @@ in
openFirewall = true;
firewallFilter = "-i wg-monitoring -p tcp -m tcp --dport 9324";
};
services.prometheus.exporters.blackbox = mkIf cfg.blackbox {
enable = true;
openFirewall = true;
firewallFilter = "-i wg-monitoring -p tcp -m tcp --dport 9115";
configFile = pkgs.writeText "blackbox.yml" ''
modules:
icmp6:
prober: icmp
icmp:
preferred_ip_protocol: ip6
ip_protocol_fallback: false
icmp4:
prober: icmp
icmp:
preferred_ip_protocol: ip4
ip_protocol_fallback: false
'';
};
};
}