cluster/services/storage: scrape metrics from garage

This commit is contained in:
Max Headroom 2023-11-04 19:46:30 +01:00
parent eefc380890
commit b332dc4a4e
2 changed files with 21 additions and 0 deletions

View file

@ -28,6 +28,7 @@ in
];
garageConfig = [
./garage-gateway.nix
./garage-metrics.nix
{
services.garage = {
inherit (config.garage) buckets keys;

View file

@ -0,0 +1,20 @@
{ 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;
};
};
};
};
}