depot/cluster/services/storage/garage-metrics.nix

21 lines
434 B
Nix
Raw Permalink Normal View History

{ config, lib, ... }:
let
inherit (config.links) garageMetrics;
in
{
services.grafana-agent = {
settings.metrics.configs = lib.singleton {
name = "metrics-garage";
scrape_configs = lib.singleton {
job_name = "garage";
static_configs = lib.singleton {
targets = lib.singleton garageMetrics.tuple;
labels.instance = config.networking.hostName;
};
};
};
};
}