-
Notifications
You must be signed in to change notification settings - Fork 96
/
prometheus-alerts.yaml
70 lines (70 loc) · 2.36 KB
/
prometheus-alerts.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
"groups":
- "name": "celery"
"rules":
- "alert": "CeleryTaskHighFailRate"
"annotations":
"dashboard_url": "https://grafana.com/d/celery-tasks-by-task-32s3/celery-tasks-by-task?var-job={{ $labels.job }}&var-queue_name={{ $labels.queue_name }}&var-task={{ $labels.name }}"
"description": "More than 5% tasks failed for the task {{ $labels.job }}/{{ $labels.queue_name }}/{{ $labels.name }} the past 10m."
"summary": "Celery high task fail rate."
"expr": |
sum(
increase(
celery_task_failed_total{
job=~"celery|celery-exporter",
queue_name!~"None",
name!~"None"
}[10m]
)
) by (job, namespace, queue_name, name)
/
(
sum(
increase(
celery_task_failed_total{
job=~"celery|celery-exporter",
queue_name!~"None",
name!~"None"
}[10m]
)
) by (job, namespace, queue_name, name)
+
sum(
increase(
celery_task_succeeded_total{
job=~"celery|celery-exporter",
queue_name!~"None",
name!~"None"
}[10m]
)
) by (job, namespace, queue_name, name)
)
* 100 > 5
"for": "1m"
"labels":
"severity": "warning"
- "alert": "CeleryHighQueueLength"
"annotations":
"dashboard_url": "https://grafana.com/d/celery-tasks-overview-32s3/celery-tasks-overview?&var-job={{ $labels.job }}&var-queue_name={{ $labels.queue_name }}"
"description": "More than 100 tasks in the queue {{ $labels.job }}/{{ $labels.queue_name }} the past 20m."
"summary": "Celery high queue length."
"expr": |
sum(
celery_queue_length{
job=~"celery|celery-exporter",
queue_name!~"None"
}
) by (job, namespace, queue_name)
> 100
"for": "20m"
"labels":
"severity": "warning"
- "alert": "CeleryWorkerDown"
"annotations":
"dashboard_url": "https://grafana.com/d/celery-tasks-overview-32s3/celery-tasks-overview?&var-job={{ $labels.job }}"
"description": "The Celery worker {{ $labels.job }}/{{ $labels.hostname }} is offline."
"summary": "A Celery worker is offline."
"expr": |
celery_worker_up{job=~"celery|celery-exporter"} == 0
"for": "15m"
"labels":
"severity": "warning"