From 78651eb5f86d64795bbd2203a3663e9ed95d9119 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Thu, 17 Oct 2024 07:08:28 -0500 Subject: [PATCH] v-m/alerts: Add alerts for PostgreSQL WAL archiver --- victoria-metrics/alerts.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/victoria-metrics/alerts.yml b/victoria-metrics/alerts.yml index 5ea036c..eb92ba4 100644 --- a/victoria-metrics/alerts.yml +++ b/victoria-metrics/alerts.yml @@ -89,6 +89,24 @@ groups: - ignoring (instance) group_right (scope) (patroni_xlog_replayed_location != 0) > 10240 for: 10m + - alert: WAL archive process failed + expr: >- + pg_stat_archiver_failed_count > 0 + annotations: + summary: The archiver process failed for one or more WAL segments + description: >- + Check the WAL segment archiver configuration and confirm that WAL + segments are being backed up correctly. + - alert: No recent WAL archives + expr: >- + pg_stat_archiver_last_archive_age > 3600 + annotations: + summary: The last successful WAL segment backup was over 1h ago + description: >- + The WAL archiver process has not run successfully for over an hour. + Ensure the WAL backup process is configured correctly and the backup + target is online and healthy. + - name: Temperature rules: