From 2aacfb2689faba21464c4ffd3ff072c8f027cf31 Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Tue, 10 Mar 2026 22:29:02 +0100 Subject: [PATCH 1/2] prometheus, alertmanager: Re-add descriptions --- modules/nixos/services/alertmanager.nix | 5 ++++- modules/nixos/services/prometheus.nix | 12 ++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/modules/nixos/services/alertmanager.nix b/modules/nixos/services/alertmanager.nix index a610b90..77e04fe 100644 --- a/modules/nixos/services/alertmanager.nix +++ b/modules/nixos/services/alertmanager.nix @@ -83,7 +83,10 @@ in notification = { topic = "splitleaf"; priority = "default"; - templates.title = ''{{ if eq .Status "firing" }}{{ index .Annotations "summary" }}{{ else }}{{ index .Annotations "summary_resolved" }}{{ end }}''; + templates = { + title = ''{{ if eq .Status "firing" }}{{ index .Annotations "summary" }}{{ else }}{{ index .Annotations "summary_resolved" }}{{ end }}''; + description = ''{{ if eq .Status "firing" }}{{ index .Annotations "description" }}{{ else }}{{ index .Annotations "description_resolved" }}{{ end }}''; + }; tags = [ { condition = ''status == "resolved"''; diff --git a/modules/nixos/services/prometheus.nix b/modules/nixos/services/prometheus.nix index 17f887d..f7cb64d 100644 --- a/modules/nixos/services/prometheus.nix +++ b/modules/nixos/services/prometheus.nix @@ -98,6 +98,8 @@ in annotations = { summary = "${hostName} is DOWN"; summary_resolved = "${hostName} is up again"; + description = "No metrics received for over 2 minutes."; + description_resolved = "Metrics are being received again."; }; }) ) @@ -107,8 +109,10 @@ in expr = ''up{job=~"prometheus|alertmanager"} == 0''; for = "2m"; annotations = { - summary = "{{ $labels.job }} on {{ $labels.instance }} is DOWN"; - summary_resolved = "{{ $labels.job }} on {{ $labels.instance }} is up again"; + summary = "{{ $labels.job | title }} on {{ $labels.instance }} is DOWN"; + summary_resolved = "{{ $labels.job | title }} on {{ $labels.instance }} is up again"; + description = "Unresponsive for over 2 minutes."; + description_resolved = "Responding normally."; }; } { @@ -117,6 +121,8 @@ in annotations = { summary = "{{ $labels.instance }} deployment failed"; summary_resolved = "{{ $labels.instance }} deployment recovered"; + description = "Deployment is not reaching \"done\" status."; + description_resolved = "Deployment completed successfully."; }; } { @@ -126,6 +132,8 @@ in annotations = { summary = "Hosts are running different commits"; summary_resolved = "All hosts are running the same commit again"; + description = "Possibly a failed deployment or incompatible configurations."; + description_resolved = "All hosts are in sync."; }; } ]; From de5314fc31059b7812fb613a91624ce90b80bc07 Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Tue, 10 Mar 2026 22:40:41 +0100 Subject: [PATCH 2/2] workflows: Prepend reusable workfow with `_` --- .github/workflows/{build-host.yml => _build-host.yml} | 0 .github/workflows/ci.yml | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename .github/workflows/{build-host.yml => _build-host.yml} (100%) diff --git a/.github/workflows/build-host.yml b/.github/workflows/_build-host.yml similarity index 100% rename from .github/workflows/build-host.yml rename to .github/workflows/_build-host.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b94f62..3c17f32 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -89,14 +89,14 @@ jobs: run: nix build .#checks.x86_64-linux.${{ matrix.check }} --print-build-logs build-server: needs: parse-flake - uses: ./.github/workflows/build-host.yml + uses: ./.github/workflows/_build-host.yml with: hosts: ${{ needs.parse-flake.outputs.servers }} secrets: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} build-workstation: needs: parse-flake - uses: ./.github/workflows/build-host.yml + uses: ./.github/workflows/_build-host.yml with: hosts: ${{ needs.parse-flake.outputs.workstations }} secrets: