diff --git a/hosts/beliskner/default.nix b/hosts/beliskner/default.nix index bfaa4150..2b274dc8 100644 --- a/hosts/beliskner/default.nix +++ b/hosts/beliskner/default.nix @@ -71,16 +71,29 @@ }; - ragon.agenix.secrets."prometheusBlackboxConfig" = { owner = config.services.prometheus.exporters.blackbox.user; }; - users.groups.${config.services.prometheus.exporters.blackbox.user} = { }; - users.users.${config.services.prometheus.exporters.blackbox.user} = { - isSystemUser = true; - group = config.services.prometheus.exporters.blackbox.user; - }; + ragon.agenix.secrets."prometheusBlackboxConfig.yaml" = { owner = "prometheus"; }; + services.prometheus.scrapeConfigs = [{ + job_name = "blackbox"; + file_sd_configs = [{ + files = [ + config.age.secrets."prometheusBlackboxConfig.yaml".path + ]; + }]; + }]; + services.prometheus.checkConfig = false; services.prometheus.exporters.blackbox = { enable = true; - configFile = "${config.age.secrets.prometheusBlackboxConfig.path}"; - enableConfigCheck = false; + configFile = pkgs.writeText "blackboxexporter" '' + modules: + dns: + prober: dns + http_2xx: + prober: http + timeout: 5s + http: + method: GET + preferred_ip_protocol: "ip4" # defaults to "ip6" + ''; }; diff --git a/hosts/picard/xynospace-matrix.nix b/hosts/picard/xynospace-matrix.nix index 8fac4102..7fff7de1 100644 --- a/hosts/picard/xynospace-matrix.nix +++ b/hosts/picard/xynospace-matrix.nix @@ -111,6 +111,9 @@ in locations."/_matrix" = { proxyPass = "http://${localAddress}:8008"; # without a trailing / }; + locations."/notifications" = { + proxyPass = "http://${localAddress}:8008"; # without a trailing / + }; locations."/synapse" = { proxyPass = "http://${localAddress}:8008"; # without a trailing / }; diff --git a/secrets/prometheusBlackboxConfig.age b/secrets/prometheusBlackboxConfig.age deleted file mode 100644 index 23b5ae85..00000000 Binary files a/secrets/prometheusBlackboxConfig.age and /dev/null differ diff --git a/secrets/prometheusBlackboxConfig.yaml.age b/secrets/prometheusBlackboxConfig.yaml.age new file mode 100644 index 00000000..968d2bd2 Binary files /dev/null and b/secrets/prometheusBlackboxConfig.yaml.age differ diff --git a/secrets/secrets.nix b/secrets/secrets.nix index 45457d86..7886b84e 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -23,7 +23,7 @@ in "gitlabSecretFile.age".publicKeys = pubkeys.ragon.host "picard"; "gitlabDBFile.age".publicKeys = pubkeys.ragon.host "picard"; "gitlabOTPFile.age".publicKeys = pubkeys.ragon.host "picard"; - "prometheusBlackboxConfig.age".publicKeys = pubkeys.ragon.host "beliskner"; + "prometheusBlackboxConfig.yaml.age".publicKeys = pubkeys.ragon.host "beliskner"; "gitlabJWSFile.age".publicKeys = pubkeys.ragon.host "picard"; "nextcloudAdminPass.age".publicKeys = pubkeys.ragon.host "picard"; "picardResticSSHKey.age".publicKeys = pubkeys.ragon.host "picard";