From eceaf67ad667f8c12928065ee1ef88337c0dba6f Mon Sep 17 00:00:00 2001 From: ahuston-0 Date: Sat, 22 Jun 2024 22:33:07 -0400 Subject: [PATCH] finalize hydra promtheus config Signed-off-by: ahuston-0 --- systems/palatine-hill/hydra.nix | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/systems/palatine-hill/hydra.nix b/systems/palatine-hill/hydra.nix index 3cdd57c..d860420 100644 --- a/systems/palatine-hill/hydra.nix +++ b/systems/palatine-hill/hydra.nix @@ -4,7 +4,9 @@ pkgs, ... }: - +let + hydra_prometheus_port = 9199; +in { systemd.services.hydra-notify.serviceConfig.EnvironmentFile = config.sops.secrets."hydra/environment".path; @@ -56,7 +58,7 @@ listen_address = 127.0.0.1 - port = 9199 + port = ${hydra_prometheus_port} ''; @@ -76,8 +78,19 @@ }; scrapeConfigs = [ { - job_name = "hydra"; - static_configs = [ { targets = [ "127.0.0.1:9199" ]; } ]; + job_name = "palatine-hill"; + static_configs = [ + { targets = [ "127.0.0.1:${toString config.services.prometheus.exporters.node.port}" ]; } + ]; + } + { + job_name = "hydra-local"; + static_configs = [ { targets = [ "127.0.0.1:${hydra_prometheus_port}" ]; } ]; + } + { + job_name = "hydra-external"; + scheme = "https"; + static_configs = [ { targets = [ "hydra.alicehuston.xyz" ]; } ]; } ]; };