1
0
Fork 0
mirror of https://github.com/mdlayher/homelab.git synced 2024-12-14 11:47:32 +00:00

nixos/servnerr-3: convert blackbox_exporter config to Nix, nixfmt

Signed-off-by: Matt Layher <mdlayher@gmail.com>
This commit is contained in:
Matt Layher 2020-06-12 17:54:29 -04:00
parent 686cfcca6a
commit 14477541a5
No known key found for this signature in database
GPG key ID: 77BFE531397EDE94
2 changed files with 20 additions and 21 deletions

View file

@ -72,20 +72,19 @@ in {
blackbox = {
enable = true;
configFile = pkgs.writeText "blackbox.yml" ''
modules:
http_2xx:
prober: http
http_401:
prober: http
http:
valid_status_codes: [401]
ssh_banner:
prober: tcp
tcp:
query_response:
- expect: "^SSH-2.0-"
'';
configFile = pkgs.writeText "blackbox.yml" (builtins.toJSON ({
modules = {
http_2xx.prober = "http";
http_401 = {
prober = "http";
http.valid_status_codes = [ 401 ];
};
ssh_banner = {
prober = "tcp";
tcp.query_response = [{ expect = "^SSH-2.0-"; }];
};
};
}));
};
# SNMP exporter with data file from release 0.17.0.