From 8855886547499c54c92e6ffd7baf5ad018f52a71 Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Tue, 3 Mar 2026 17:23:19 +0100 Subject: [PATCH] prometheus, alertmanager: Add description to alert --- modules/nixos/services/alertmanager.nix | 5 +---- modules/nixos/services/prometheus.nix | 5 ++++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/nixos/services/alertmanager.nix b/modules/nixos/services/alertmanager.nix index 45bbf84..4a2dcd8 100644 --- a/modules/nixos/services/alertmanager.nix +++ b/modules/nixos/services/alertmanager.nix @@ -75,10 +75,7 @@ in notification = { topic = "splitleaf"; priority = "default"; - templates = { - title = ''{{ index .Annotations "summary" }}''; - description = ""; - }; + templates.title = ''{{ index .Annotations "summary" }}''; tags = [ { condition = ''status == "resolved"''; diff --git a/modules/nixos/services/prometheus.nix b/modules/nixos/services/prometheus.nix index 7c1b17c..f9984b5 100644 --- a/modules/nixos/services/prometheus.nix +++ b/modules/nixos/services/prometheus.nix @@ -89,7 +89,10 @@ in expr = "up == 0"; for = "2m"; labels.severity = "critical"; - annotations.summary = "{{ $labels.instance }} is DOWN"; + annotations = { + summary = "{{ $labels.instance }} is DOWN"; + description = "{{ $labels.instance }} of job {{ $labels.job }} has been down for more than 2 minutes."; + }; }; }; }