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:
parent
686cfcca6a
commit
14477541a5
2 changed files with 20 additions and 21 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue