service/home-assistant: fix monitoring

This commit is contained in:
Felix Buehler 2023-11-20 21:48:44 +01:00
parent 2807feac41
commit 67be64d3dd

View file

@ -103,32 +103,29 @@ in
"::1" "::1"
]; ];
}; };
prometheus.requires_auth = false;
}; };
extraComponents = [ extraComponents = [
"backup" "backup"
"deutsche_bahn"
"prometheus" "prometheus"
] ++ cfg.extraComponents; ] ++ cfg.extraComponents;
}; };
# services.prometheus.scrapeConfigs = [ services.prometheus.scrapeConfigs = [
# { {
# job_name = "home-assistant"; job_name = "home-assistant";
# metrics_path = "/api/prometheus"; metrics_path = "/api/prometheus";
static_configs = [
# authorization.credentials: "your.longlived.token"; {
targets = [ "127.0.0.1:${toString cfg.port}" ];
# static_configs = [ labels = {
# { instance = config.networking.hostName;
# targets = [ "127.0.0.1:${toString cfg.port}" ]; };
# labels = { }
# instance = config.networking.hostName; ];
# }; }
# } ];
# ];
# }
# ];
my.services.prometheus.rules = { my.services.prometheus.rules = {
homeassistant = { homeassistant = {