cluster/services/storage: scrape metrics from garage
This commit is contained in:
parent
eefc380890
commit
b332dc4a4e
2 changed files with 21 additions and 0 deletions
|
@ -28,6 +28,7 @@ in
|
|||
];
|
||||
garageConfig = [
|
||||
./garage-gateway.nix
|
||||
./garage-metrics.nix
|
||||
{
|
||||
services.garage = {
|
||||
inherit (config.garage) buckets keys;
|
||||
|
|
20
cluster/services/storage/garage-metrics.nix
Normal file
20
cluster/services/storage/garage-metrics.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue