From 142d5a0103ef6b3d28edbf38969a52a5d5d8ec6a Mon Sep 17 00:00:00 2001 From: Hoan To Date: Thu, 8 Sep 2022 15:47:28 +0000 Subject: [PATCH] DEV-541: postgres zombies alert --- templates/prometheus/config/prometheus/alert.rules.j2 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/templates/prometheus/config/prometheus/alert.rules.j2 b/templates/prometheus/config/prometheus/alert.rules.j2 index 40a74e0..3041f40 100644 --- a/templates/prometheus/config/prometheus/alert.rules.j2 +++ b/templates/prometheus/config/prometheus/alert.rules.j2 @@ -350,3 +350,14 @@ groups: summary: "Elasticsearch health status is not green. Please Check" description: "Alert for Elasticsearch health status" + - alert: postgres backup zombies + expr: 100 - ((node_filesystem_avail_bytes{instance=~"{{ stage }}-postgres-01.smardigo.digital",job=~"node-exporter",device='/dev/mapper/vg.postgres_backup-lv.postgres_backup'} * 100) / node_filesystem_size_bytes{instance=~"{{ stage }}-postgres-01.smardigo.digital",job=~"node-exporter",device='/dev/mapper/vg.postgres_backup-lv.postgres_backup'}) > 10 + for: 2h + labels: + severity: critical + annotations: + identifier: '{{ '{{' }} $labels.instance {{ '}}' }}' + summary: "postgres backup zombies, have not been deleted" + description: "postgres backup zombies, have not been deleted" + +