From eafc87415ab91856803d814f21b09f5a8add10d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Wed, 12 Jul 2023 15:03:05 +0200 Subject: [PATCH] feat(prometheus): scrape home assistant --- systems/makanek/monitoring/default.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/systems/makanek/monitoring/default.nix b/systems/makanek/monitoring/default.nix index f21e0db..8d76800 100644 --- a/systems/makanek/monitoring/default.nix +++ b/systems/makanek/monitoring/default.nix @@ -247,6 +247,12 @@ in { group = "prometheus"; mode = "440"; }; + home-assistant-token = { + file = ../../../secrets/home-assistant-token.age; + owner = "prometheus"; + group = "prometheus"; + mode = "440"; + }; }; services.prometheus.alertmanagers = [ @@ -315,6 +321,14 @@ in { } ]; } + { + job_name = "home_assistant"; + scrape_interval = "60s"; + metrics_path = "/api/prometheus"; + scheme = "http"; + static_configs = [{targets = ["zaatar.r:8123"];}]; + bearer_token_file = config.age.secrets.home-assistant-token.path; + } { job_name = "ful"; static_configs = [