Verified Commit 9a2aa884 authored by Jelle van der Waa's avatar Jelle van der Waa 🚧
Browse files

Show when the last backup was made in the borg backup alert

Prometheus alerts $value is the result of the expression, so it will be
the amount of seconds since the last backup and not the last backup
date.
parent 9e099305
......@@ -266,7 +266,7 @@ groups:
severity: critical
annotations:
summary: 'Borg Hetzner missing backup (instance {{ $labels.instance }})'
description: 'Borg has not backuped for more than 24 hours. Last backup made on {{ $value | humanizeTimestamp }}'
description: 'Borg has not backuped for more than 24 hours. Last backup was made {{ $value | humanizeDuration }} ago'
- alert: BorgOffsiteMissingBackup
expr: time() - borg_offsite_last_archive_timestamp > 86400 * 1.5
for: 2m
......@@ -274,7 +274,7 @@ groups:
severity: critical
annotations:
summary: 'Borg Offsite missing backup (instance {{ $labels.instance }})'
description: 'Borg has not backuped for more than 24 hours. Last backup made on {{ $value | humanizeTimestamp }}'
description: 'Borg has not backuped for more than 24 hours. Last backup was made {{ $value | humanizeDuration }} ago'
- name: systemd_unit
interval: 15s
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment