summaryrefslogtreecommitdiff
path: root/roles/monitoring
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2022-01-11 00:33:45 +0100
committerChristian Pointner <equinox@spreadspace.org>2022-01-11 00:33:45 +0100
commitfd03bf128252d768e51bc1d2cc8eb7bd416e91c4 (patch)
treebdb30dbeb4c7dd2ee72599a9d3143fd8bd7aefb4 /roles/monitoring
parentzfs/syncoid: add duration of job to prometheus metrics (diff)
prometheus: add alert rules for syncoid pull based backups
Diffstat (limited to 'roles/monitoring')
-rw-r--r--roles/monitoring/prometheus/server/defaults/main/rules_node.yml18
1 files changed, 18 insertions, 0 deletions
diff --git a/roles/monitoring/prometheus/server/defaults/main/rules_node.yml b/roles/monitoring/prometheus/server/defaults/main/rules_node.yml
index e6415bd9..6d4f763f 100644
--- a/roles/monitoring/prometheus/server/defaults/main/rules_node.yml
+++ b/roles/monitoring/prometheus/server/defaults/main/rules_node.yml
@@ -370,3 +370,21 @@ prometheus_server_rules_node:
annotations:
summary: Host disk S.M.A.R.T. reports spin-up retries (instance {{ '{{' }} $labels.instance {{ '}}' }})
description: "S.M.A.R.T. reports spin-up retries for disk {{ '{{' }} $labels.device {{ '}}' }} on host {{ '{{' }} $labels.instance {{ '}}' }}, the drive might be failing.\n VALUE = {{ '{{' }} $value {{ '}}' }}\n LABELS = {{ '{{' }} $labels {{ '}}' }}"
+
+ - alert: SyncoidPullJobTooLongAgo
+ expr: time() - syncoid_pull_run > (24 * 3600)
+ for: 0m
+ labels:
+ severity: warning
+ annotations:
+ summary: The last syncoid pull job was too long ago (instance {{ '{{' }} $labels.instance {{ '}}' }})
+ description: "The last syncoid-based backup job of {{ '{{' }} $labels.instance {{ '}}' }} from {{ '{{' }} $labels.backup_server {{ '}}' }} ran more then 24 hours ago.\n VALUE = {{ '{{' }} $value {{ '}}' }}\n LABELS = {{ '{{' }} $labels {{ '}}' }}"
+
+ - alert: SyncoidPullJobFailed
+ expr: syncoid_pull_exit_code != 0
+ for: 0m
+ labels:
+ severity: warning
+ annotations:
+ summary: The last syncoid pull job failed (instance {{ '{{' }} $labels.instance {{ '}}' }})
+ description: "The last syncoid-based backup job of {{ '{{' }} $labels.instance {{ '}}' }} from {{ '{{' }} $labels.backup_server {{ '}}' }} has failed.\n VALUE = {{ '{{' }} $value {{ '}}' }}\n LABELS = {{ '{{' }} $labels {{ '}}' }}"