21 lines
434 B
Nix
21 lines
434 B
Nix
|
{ 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;
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|