-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrules-jenkins.yaml
57 lines (53 loc) · 2.2 KB
/
rules-jenkins.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
---
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: jenkins-rules
namespace: monitoring
spec:
groups:
- name: jenkins
interval: 5m
rules:
# https://joostvdg.github.io/blogs/monitor-jenkins-on-k8s/alerts/
- alert: JenkinsTooManyJobsQueued
expr: jenkins_queue_size_value{service="jenkins-operator-http-jenkins"} > 30
for: 120m
labels:
severity: notify
annotations:
summary: " {{ $labels.app_kubernetes_io_instance }} too many jobs queued"
description: "{{ $labels.app_kubernetes_io_instance }} has {{ $value }} jobs stuck in the queue"
- alert: JenkinsTooManyJobsStuckInQueue
expr: jenkins_queue_stuck_value{service="jenkins-operator-http-jenkins"} > 5
for: 120m
labels:
severity: notify
annotations:
summary: " {{ $labels.app_kubernetes_io_instance }} too many jobs queued"
description: " {{ $labels.app_kubernetes_io_instance }} has {{ $value }} jobs in queue"
- alert: JenkinsHealthScoreToLow
expr: jenkins_health_check_score{service="jenkins-operator-http-jenkins"} < 1
for: 10m
labels:
severity: notify
annotations:
summary: " {{ $labels.app_kubernetes_io_instance }} has a to low health score"
description: " {{ $labels.app_kubernetes_io_instance }} a health score lower than 100%"
- alert: JenkinsTooManyPluginsNeedUpate
expr: jenkins_plugins_withUpdate{service="jenkins-operator-http-jenkins"} > 20
for: 10m
labels:
severity: notify
annotations:
summary: " {{ $labels.app_kubernetes_io_instance }} too many plugins updates"
description: " {{ $labels.app_kubernetes_io_instance }} has {{ $value }} plugins that require an update"
- alert: JenkinsVMMemoryRationTooHigh
expr: vm_memory_heap_usage{service="jenkins-operator-http-jenkins"} > 0.70
for: 3m
labels:
severity: notify
annotations:
summary: "{{$labels.app_kubernetes_io_instance}} too high memory ration"
description: "{{$labels.app_kubernetes_io_instance}} has a too high VM memory ration"
...