cluster/services/ipfs: metrics via grafana-agent

This commit is contained in:
Max Headroom 2023-06-02 18:33:03 +02:00
parent a714c37cec
commit d264751a9f
2 changed files with 18 additions and 14 deletions

View file

@ -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;
};
};
};
}

View file

@ -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 = [ ];
};
}