From 74adf032696d85c83333f410c467493603c892eb Mon Sep 17 00:00:00 2001 From: Rasmus Wejlgaard Date: Fri, 3 Apr 2026 03:47:51 +0000 Subject: [PATCH] Add rule_files to prometheus.yml, remove empty node-exporter.rules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit prometheus.yml was missing the rule_files section, so alerting rules deployed to /usr/local/etc/prometheus/rules/ were never loaded. - Add rule_files glob so Prometheus evaluates the ZFS pool rules - Document that alerting notifications go through Grafana, not Alertmanager — no alerting: section needed - Remove node-exporter.rules (all rules were commented out) Resolves PESO-103 --- ansible/services/prometheus/prometheus.yml | 7 +++++++ ansible/services/prometheus/rules/node-exporter.rules | 9 --------- 2 files changed, 7 insertions(+), 9 deletions(-) delete mode 100644 ansible/services/prometheus/rules/node-exporter.rules diff --git a/ansible/services/prometheus/prometheus.yml b/ansible/services/prometheus/prometheus.yml index 88ed3b6..110483b 100644 --- a/ansible/services/prometheus/prometheus.yml +++ b/ansible/services/prometheus/prometheus.yml @@ -8,6 +8,13 @@ global: scrape_interval: 15s evaluation_interval: 15s +# Alerting notifications are handled by Grafana (unified alerting with +# PagerDuty + email contact points), not Alertmanager. No alerting: +# section is needed here. Prometheus still evaluates these rule_files +# so the ALERTS / ALERTS_FOR_STATE metrics are available for queries. +rule_files: + - /usr/local/etc/prometheus/rules/*.rules + scrape_configs: - job_name: "prometheus" static_configs: diff --git a/ansible/services/prometheus/rules/node-exporter.rules b/ansible/services/prometheus/rules/node-exporter.rules deleted file mode 100644 index c9798fb..0000000 --- a/ansible/services/prometheus/rules/node-exporter.rules +++ /dev/null @@ -1,9 +0,0 @@ -groups: -- name: alerts - rules: -# - alert: ServerRunningBtrfs -# expr: node_btrfs_info > 0 -# for: 5m -# annotations: -# summary: "Server {{ $labels.job }} is running btrfs" -# description: "{{ $labels.job }} has uuid of '{{ $labels.uuid }}'" \ No newline at end of file