Commit 1826cf30 authored by Marat Kalibekov's avatar Marat Kalibekov

Fix alert for backups

1. Moved from hours to seconds
2. Fixed some typos
3. Humanize output
parent 94f4f5a7
gitlab_com:last_backup_age_in_hours=(time()-gitlab_com_backup_time)/60/60
gitlab_com:last_backup_age_in_seconds=(time()-gitlab_com_backup_time)
ALERT gitlab_com_backup_too_old
IF gitlab_com:last_backup_age_in_hours >= 36
FOR 1m
IF gitlab_com:last_backup_age_in_seconds >= 36*60*60
FOR 30s
LABELS { severity = "critical" }
ANNOTATIONS {
title = "Regular backup for GitLab.com was taken more than {{ .Value }} hours ago. Please take the actions or in case of accident we could loose data.",
title = "Regular backup for GitLab.com was taken more than {{ .Value | humanizeDuration }} hours ago. Please take the actions or in case of accident we could lose data.",
description = "Regular backups for GitLab.com are not taken on time. Please follow the runbook to review the problem.",
runbook="troubleshooting/gitlab_com_backups.md"
}
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