diff --git a/cluster/services/ipfs/monitoring.nix b/cluster/services/ipfs/monitoring.nix index 58bb142..20ee3d8 100644 --- a/cluster/services/ipfs/monitoring.nix +++ b/cluster/services/ipfs/monitoring.nix @@ -1,4 +1,8 @@ -{ cluster, ... }: +{ config, cluster, lib, ... }: + +let + inherit (config) links; +in { systemd.services.ipfs = { @@ -10,4 +14,16 @@ OTEL_TRACES_SAMPLER_ARG = "0.50"; }; }; + + services.grafana-agent.settings.metrics.configs = lib.singleton { + name = "metrics-ipfs"; + scrape_configs = lib.singleton { + job_name = "ipfs"; + metrics_path = links.ipfsMetrics.path; + static_configs = lib.singleton { + targets = lib.singleton links.ipfsMetrics.tuple; + labels.instance = config.networking.hostName; + }; + }; + }; } diff --git a/cluster/services/monitoring/server.nix b/cluster/services/monitoring/server.nix index 0b4aba9..a01ac58 100644 --- a/cluster/services/monitoring/server.nix +++ b/cluster/services/monitoring/server.nix @@ -95,19 +95,7 @@ in globalConfig = { scrape_interval = "60s"; }; - scrapeConfigs = [ - { - job_name = "ipfs"; - scheme = "https"; - metrics_path = "/debug/metrics/prometheus"; - static_configs = [ - { - targets = [ "ipfs.admin.${domain}" ]; - labels.instance = "VEGAS"; - } - ]; - } - ]; + scrapeConfigs = [ ]; }; }