cluster/services/ipfs: metrics via grafana-agent
This commit is contained in:
parent
a714c37cec
commit
d264751a9f
2 changed files with 18 additions and 14 deletions
|
@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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 = [ ];
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue