From fc5dcb84a1e1b09e76679c117443d892dcbe3c09 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Sun, 18 Jun 2023 22:53:34 +0200 Subject: [PATCH] service/home-assistant: forward notification --- modules/services/home-assistant/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/services/home-assistant/default.nix b/modules/services/home-assistant/default.nix index 017ab38..2fe5a69 100644 --- a/modules/services/home-assistant/default.nix +++ b/modules/services/home-assistant/default.nix @@ -122,6 +122,13 @@ in # } # ]; + my.services.prometheus.rules = { + homeassistant = { + condition = ''homeassistant_entity_available{domain="persistent_notification", entity!~"persistent_notification.http_login|persistent_notification.recorder_database_migration"} >= 0''; + description = "homeassistant notification {{$labels.entity}} ({{$labels.friendly_name}}): {{$value}}"; + }; + }; + my.services.nginx.virtualHosts = [ { subdomain = "automation";