@cryptotaxi247 / infra-1 / commits / 7b655c7e

eris: monitor channel jobs

Graham Christensen committed Dec 29, 2019 at 23:52 UTC 7b655c7e2f4deb1b1df0e8873564c64f9f9d8351
1 file changed +12 -2
delft/eris.nix
+12 -2
@@ -372,8 +372,18 @@ in {
372 }
373 ];
374 }
375 -
376 - ];
375 + ] ++ lib.mapAttrsToList (name: value: {
376 + job_name = "channel-job-${name}";
377 + scheme = "https";
378 + metrics_path = "/job/${value.job}/prometheus";
379 + static_configs = [ {
380 + labels = {
381 + current = if value.current then "1" else "0";
382 + channel = name;
383 + };
384 + targets = [ "hydra.nixos.org:443" ];
385 + } ];
386 + }) (import ../channels.nix).channels;
387 };
388
389 services.grafana = {