v-m/alerts: Fire paperless email alert after 12h
We don't need a notification about paperless not scheduling email tasks every time there is a gap in the metric. This can happen in some innocuous situations like when the pod restarts or if there is a brief disruption of service. Using the `absent_over_time` function with a range vector, we can have the alert fire only if there have been no email tasks scheduled within the last 12 hours.pull/38/head
parent
d04c18cfcd
commit
a03d63841d
|
@ -254,11 +254,11 @@ groups:
|
|||
for details about the task failures.
|
||||
- alert: Paperless email task not running
|
||||
expr: >-
|
||||
absent(
|
||||
absent_over_time(
|
||||
flower_events_total{
|
||||
type="task-started",
|
||||
task="paperless_mail.tasks.process_mail_accounts"
|
||||
}
|
||||
}[12h]
|
||||
)
|
||||
annotations:
|
||||
summary: Paperless task to process mail accounts has not run recently
|
||||
|
|
Loading…
Reference in New Issue