mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-05-24 18:04:41 +02:00
service/home-assistant: fix monitoring
This commit is contained in:
parent
2807feac41
commit
67be64d3dd
1 changed files with 15 additions and 18 deletions
|
@ -103,32 +103,29 @@ in
|
|||
"::1"
|
||||
];
|
||||
};
|
||||
prometheus.requires_auth = false;
|
||||
};
|
||||
|
||||
extraComponents = [
|
||||
"backup"
|
||||
"deutsche_bahn"
|
||||
"prometheus"
|
||||
] ++ cfg.extraComponents;
|
||||
};
|
||||
|
||||
# services.prometheus.scrapeConfigs = [
|
||||
# {
|
||||
# job_name = "home-assistant";
|
||||
# metrics_path = "/api/prometheus";
|
||||
|
||||
# authorization.credentials: "your.longlived.token";
|
||||
|
||||
# static_configs = [
|
||||
# {
|
||||
# targets = [ "127.0.0.1:${toString cfg.port}" ];
|
||||
# labels = {
|
||||
# instance = config.networking.hostName;
|
||||
# };
|
||||
# }
|
||||
# ];
|
||||
# }
|
||||
# ];
|
||||
services.prometheus.scrapeConfigs = [
|
||||
{
|
||||
job_name = "home-assistant";
|
||||
metrics_path = "/api/prometheus";
|
||||
static_configs = [
|
||||
{
|
||||
targets = [ "127.0.0.1:${toString cfg.port}" ];
|
||||
labels = {
|
||||
instance = config.networking.hostName;
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
my.services.prometheus.rules = {
|
||||
homeassistant = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue