@leverege/build-tools 2.66.0 → 2.66.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/helm-charts/prom-operator/prometheus-stack.yaml.ovh +1 -1
- package/src/helm-charts/prom-operator/rules/awesome-base/elasticsearch-rules.yaml +219 -0
- package/src/helm-charts/prom-operator/rules/awesome-base/etcd-exporter.yaml +153 -0
- package/src/helm-charts/prom-operator/rules/awesome-base/google-cadvisor.yaml +108 -0
- package/src/helm-charts/prom-operator/rules/{new-awesome.yaml → awesome-base/kubestate-exporter.yaml} +2 -1
- package/src/helm-charts/prom-operator/rules/awesome-base/prometheus-rules.yaml +318 -0
- package/src/helm-charts/prom-operator/rules/awesome-base/redis-rules.yaml +142 -0
- package/src/helm-charts/prom-operator/rules/awesome-base/traefik-rules.yaml +43 -0
- package/src/helm-charts/prom-operator/rules/cadvisor-rules.yaml +109 -0
- package/src/helm-charts/prom-operator/rules/elasticsearch-rules.yaml +213 -95
- package/src/helm-charts/prom-operator/rules/etcd-rulte.yaml +153 -0
- package/src/helm-charts/prom-operator/rules/kubestate-rules.yaml +412 -0
- package/src/helm-charts/prom-operator/rules/prometheus-rules.yaml +312 -73
- package/src/helm-charts/prom-operator/rules/redis-rules.yaml +136 -75
- package/src/helm-charts/prom-operator/rules/traefik-rules.yaml +48 -21
- package/src/helmup.sh +1 -1
- package/src/helm-charts/prom-operator/rules/awesome-k8s.yaml +0 -326
- package/src/helm-charts/prom-operator/rules/kubernetes-rules.yaml +0 -109
|
@@ -1,27 +1,54 @@
|
|
|
1
|
+
# https://samber.github.io/awesome-prometheus-alerts/rules#traefik
|
|
1
2
|
apiVersion: monitoring.coreos.com/v1
|
|
2
3
|
kind: PrometheusRule
|
|
3
4
|
metadata:
|
|
4
|
-
name:
|
|
5
|
+
name: embedded-exporter-v2
|
|
5
6
|
namespace: prometheus
|
|
6
|
-
|
|
7
7
|
spec:
|
|
8
8
|
groups:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
#
|
|
23
|
-
#
|
|
24
|
-
#
|
|
25
|
-
#
|
|
26
|
-
#
|
|
27
|
-
#
|
|
9
|
+
- name: EmbeddedExporterV2-rules
|
|
10
|
+
rules:
|
|
11
|
+
- alert: TraefikServiceDown
|
|
12
|
+
expr: count(traefik_service_server_up) by (service) == 0
|
|
13
|
+
for: 0m
|
|
14
|
+
labels:
|
|
15
|
+
severity: critical
|
|
16
|
+
annotations:
|
|
17
|
+
summary: Traefik service down (instance {{ $labels.instance }})
|
|
18
|
+
description: |-
|
|
19
|
+
All Traefik services are down
|
|
20
|
+
VALUE = {{ $value }}
|
|
21
|
+
LABELS = {{ $labels }}
|
|
22
|
+
# - alert: TraefikHighHttp4xxErrorRateService
|
|
23
|
+
# expr: sum(rate(traefik_service_requests_total{code=~"4.*"}[3m])) by (service) / sum(rate(traefik_service_requests_total[3m])) by (service) * 100 > 5
|
|
24
|
+
# for: 1m
|
|
25
|
+
# labels:
|
|
26
|
+
# severity: critical
|
|
27
|
+
# annotations:
|
|
28
|
+
# summary: Traefik high HTTP 4xx error rate service (instance {{ $labels.instance }})
|
|
29
|
+
# description: |-
|
|
30
|
+
# Traefik service 4xx error rate is above 5%
|
|
31
|
+
# VALUE = {{ $value }}
|
|
32
|
+
# LABELS = {{ $labels }}
|
|
33
|
+
- alert: TraefikHighHttp5xxErrorRateService
|
|
34
|
+
expr: sum(rate(traefik_service_requests_total{code=~"5.*"}[3m])) by (service) / sum(rate(traefik_service_requests_total[3m])) by (service) * 100 > 5
|
|
35
|
+
for: 1m
|
|
36
|
+
labels:
|
|
37
|
+
severity: critical
|
|
38
|
+
annotations:
|
|
39
|
+
summary: Traefik high HTTP 5xx error rate service (instance {{ $labels.instance }})
|
|
40
|
+
description: |-
|
|
41
|
+
Traefik service 5xx error rate is above 5%
|
|
42
|
+
VALUE = {{ $value }}
|
|
43
|
+
LABELS = {{ $labels }}
|
|
44
|
+
#
|
|
45
|
+
# legacy leverege alert
|
|
46
|
+
#
|
|
47
|
+
- alert: TraefikConfigReloadFailed
|
|
48
|
+
expr: traefik_config_last_reload_failure > 0
|
|
49
|
+
for: 1m
|
|
50
|
+
labels:
|
|
51
|
+
severity: warning
|
|
52
|
+
annotations:
|
|
53
|
+
summary: "Traefik config failed to reload"
|
|
54
|
+
description: "New config file for Traefik is invalid or Traefik encountered an error"
|
package/src/helmup.sh
CHANGED
|
@@ -1,326 +0,0 @@
|
|
|
1
|
-
# https://samber.github.io/awesome-prometheus-alerts/rules#kubernetes
|
|
2
|
-
apiVersion: monitoring.coreos.com/v1
|
|
3
|
-
kind: PrometheusRule
|
|
4
|
-
metadata:
|
|
5
|
-
name: awesome-k8s-rules
|
|
6
|
-
namespace: prometheus
|
|
7
|
-
|
|
8
|
-
spec:
|
|
9
|
-
groups:
|
|
10
|
-
- name: Awesome Kubernetes
|
|
11
|
-
rules:
|
|
12
|
-
- alert: KubernetesNodeNotReady
|
|
13
|
-
expr: kube_node_status_condition{condition="Ready",status="true"} == 0
|
|
14
|
-
for: 10m
|
|
15
|
-
labels:
|
|
16
|
-
severity: critical
|
|
17
|
-
annotations:
|
|
18
|
-
summary: Kubernetes Node not ready (instance {{ $labels.instance }})
|
|
19
|
-
description: "Node {{ $labels.node }} has been unready for a long time\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
20
|
-
|
|
21
|
-
- alert: KubernetesNodeMemoryPressure
|
|
22
|
-
expr: kube_node_status_condition{condition="MemoryPressure",status="true"} == 1
|
|
23
|
-
for: 2m
|
|
24
|
-
labels:
|
|
25
|
-
severity: critical
|
|
26
|
-
annotations:
|
|
27
|
-
summary: Kubernetes Node memory pressure (instance {{ $labels.instance }})
|
|
28
|
-
description: "Node {{ $labels.node }} has MemoryPressure condition\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
29
|
-
|
|
30
|
-
- alert: KubernetesNodeDiskPressure
|
|
31
|
-
expr: kube_node_status_condition{condition="DiskPressure",status="true"} == 1
|
|
32
|
-
for: 2m
|
|
33
|
-
labels:
|
|
34
|
-
severity: critical
|
|
35
|
-
annotations:
|
|
36
|
-
summary: Kubernetes Node disk pressure (instance {{ $labels.instance }})
|
|
37
|
-
description: "Node {{ $labels.node }} has DiskPressure condition\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
38
|
-
|
|
39
|
-
- alert: KubernetesNodeNetworkUnavailable
|
|
40
|
-
expr: kube_node_status_condition{condition="NetworkUnavailable",status="true"} == 1
|
|
41
|
-
for: 2m
|
|
42
|
-
labels:
|
|
43
|
-
severity: critical
|
|
44
|
-
annotations:
|
|
45
|
-
summary: Kubernetes Node network unavailable (instance {{ $labels.instance }})
|
|
46
|
-
description: "Node {{ $labels.node }} has NetworkUnavailable condition\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
47
|
-
|
|
48
|
-
- alert: KubernetesNodeOutOfPodCapacity
|
|
49
|
-
expr: sum by (node) ((kube_pod_status_phase{phase="Running"} == 1) + on(uid, instance) group_left(node) (0 * kube_pod_info{pod_template_hash=""})) / sum by (node) (kube_node_status_allocatable{resource="pods"}) * 100 > 90
|
|
50
|
-
for: 2m
|
|
51
|
-
labels:
|
|
52
|
-
severity: warning
|
|
53
|
-
annotations:
|
|
54
|
-
summary: Kubernetes Node out of pod capacity (instance {{ $labels.instance }})
|
|
55
|
-
description: "Node {{ $labels.node }} is out of pod capacity\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
56
|
-
|
|
57
|
-
# - alert: KubernetesContainerOomKiller
|
|
58
|
-
# expr: (kube_pod_container_status_restarts_total - kube_pod_container_status_restarts_total offset 10m >= 1) and ignoring (reason) min_over_time(kube_pod_container_status_last_terminated_reason{reason="OOMKilled"}[10m]) == 1
|
|
59
|
-
# for: 0m
|
|
60
|
-
# labels:
|
|
61
|
-
# severity: warning
|
|
62
|
-
# annotations:
|
|
63
|
-
# summary: Kubernetes Container oom killer (instance {{ $labels.instance }})
|
|
64
|
-
# description: "Container {{ $labels.container }} in pod {{ $labels.namespace }}/{{ $labels.pod }} has been OOMKilled {{ $value }} times in the last 10 minutes.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
65
|
-
|
|
66
|
-
- alert: KubernetesJobFailed
|
|
67
|
-
expr: kube_job_status_failed > 0
|
|
68
|
-
for: 0m
|
|
69
|
-
labels:
|
|
70
|
-
severity: warning
|
|
71
|
-
annotations:
|
|
72
|
-
summary: Kubernetes Job failed (instance {{ $labels.instance }})
|
|
73
|
-
description: "Job {{ $labels.namespace }}/{{ $labels.job_name }} failed to complete\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
74
|
-
|
|
75
|
-
- alert: KubernetesJobNotStarting
|
|
76
|
-
expr: kube_job_status_active == 0 and kube_job_status_failed == 0 and kube_job_status_succeeded == 0 and (time() - kube_job_status_start_time) > 600
|
|
77
|
-
for: 0m
|
|
78
|
-
labels:
|
|
79
|
-
severity: warning
|
|
80
|
-
annotations:
|
|
81
|
-
summary: Kubernetes Job not starting (instance {{ $labels.instance }})
|
|
82
|
-
description: "Job {{ $labels.namespace }}/{{ $labels.job_name }} did not start for 10 minutes\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
83
|
-
|
|
84
|
-
- alert: KubernetesCronjobSuspended
|
|
85
|
-
expr: kube_cronjob_spec_suspend != 0
|
|
86
|
-
for: 0m
|
|
87
|
-
labels:
|
|
88
|
-
severity: warning
|
|
89
|
-
annotations:
|
|
90
|
-
summary: Kubernetes CronJob suspended (instance {{ $labels.instance }})
|
|
91
|
-
description: "CronJob {{ $labels.namespace }}/{{ $labels.cronjob }} is suspended\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
92
|
-
|
|
93
|
-
- alert: KubernetesPersistentvolumeclaimPending
|
|
94
|
-
expr: kube_persistentvolumeclaim_status_phase{phase="Pending"} == 1
|
|
95
|
-
for: 2m
|
|
96
|
-
labels:
|
|
97
|
-
severity: warning
|
|
98
|
-
annotations:
|
|
99
|
-
summary: Kubernetes PersistentVolumeClaim pending (instance {{ $labels.instance }})
|
|
100
|
-
description: "PersistentVolumeClaim {{ $labels.namespace }}/{{ $labels.persistentvolumeclaim }} is pending\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
101
|
-
|
|
102
|
-
- alert: KubernetesVolumeOutOfDiskSpace
|
|
103
|
-
expr: kubelet_volume_stats_available_bytes / kubelet_volume_stats_capacity_bytes * 100 < 10
|
|
104
|
-
for: 2m
|
|
105
|
-
labels:
|
|
106
|
-
severity: warning
|
|
107
|
-
annotations:
|
|
108
|
-
summary: Kubernetes Volume out of disk space (instance {{ $labels.instance }})
|
|
109
|
-
description: "Volume is almost full (< 10% left)\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
110
|
-
|
|
111
|
-
# - alert: KubernetesVolumeFullInFourDays
|
|
112
|
-
# expr: predict_linear(kubelet_volume_stats_available_bytes[6h:5m], 4 * 24 * 3600) < 0
|
|
113
|
-
# for: 0m
|
|
114
|
-
# labels:
|
|
115
|
-
# severity: critical
|
|
116
|
-
# annotations:
|
|
117
|
-
# summary: Kubernetes Volume full in four days (instance {{ $labels.instance }})
|
|
118
|
-
# description: "Volume under {{ $labels.namespace }}/{{ $labels.persistentvolumeclaim }} is expected to fill up within four days. Currently {{ $value | humanize }}% is available.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
119
|
-
|
|
120
|
-
- alert: KubernetesPersistentvolumeError
|
|
121
|
-
expr: kube_persistentvolume_status_phase{phase=~"Failed|Pending", job="kube-state-metrics"} > 0
|
|
122
|
-
for: 0m
|
|
123
|
-
labels:
|
|
124
|
-
severity: critical
|
|
125
|
-
annotations:
|
|
126
|
-
summary: Kubernetes PersistentVolume error (instance {{ $labels.instance }})
|
|
127
|
-
description: "Persistent volume {{ $labels.persistentvolume }} is in bad state\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
128
|
-
|
|
129
|
-
- alert: KubernetesStatefulsetDown
|
|
130
|
-
expr: kube_statefulset_replicas != kube_statefulset_status_replicas_ready > 0
|
|
131
|
-
for: 1m
|
|
132
|
-
labels:
|
|
133
|
-
severity: critical
|
|
134
|
-
annotations:
|
|
135
|
-
summary: Kubernetes StatefulSet down (instance {{ $labels.instance }})
|
|
136
|
-
description: "StatefulSet {{ $labels.namespace }}/{{ $labels.statefulset }} went down\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
137
|
-
|
|
138
|
-
# - alert: KubernetesHpaScaleInability
|
|
139
|
-
# expr: (kube_horizontalpodautoscaler_spec_max_replicas - kube_horizontalpodautoscaler_status_desired_replicas) * on (horizontalpodautoscaler,namespace) (kube_horizontalpodautoscaler_status_condition{condition="ScalingLimited", status="true"} == 1) == 0
|
|
140
|
-
# for: 2m
|
|
141
|
-
# labels:
|
|
142
|
-
# severity: warning
|
|
143
|
-
# annotations:
|
|
144
|
-
# summary: Kubernetes HPA scale inability (instance {{ $labels.instance }})
|
|
145
|
-
# description: "HPA {{ $labels.namespace }}/{{ $labels.horizontalpodautoscaler }} is unable to scale\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
146
|
-
|
|
147
|
-
- alert: KubernetesHpaMetricsUnavailability
|
|
148
|
-
expr: kube_horizontalpodautoscaler_status_condition{status="false", condition="ScalingActive"} == 1
|
|
149
|
-
for: 0m
|
|
150
|
-
labels:
|
|
151
|
-
severity: warning
|
|
152
|
-
annotations:
|
|
153
|
-
summary: Kubernetes HPA metrics unavailability (instance {{ $labels.instance }})
|
|
154
|
-
description: "HPA {{ $labels.namespace }}/{{ $labels.horizontalpodautoscaler }} is unable to collect metrics\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
155
|
-
|
|
156
|
-
# - alert: KubernetesHpaScaleMaximum
|
|
157
|
-
# expr: (kube_horizontalpodautoscaler_status_desired_replicas >= kube_horizontalpodautoscaler_spec_max_replicas) and (kube_horizontalpodautoscaler_spec_max_replicas > 1) and (kube_horizontalpodautoscaler_spec_min_replicas != kube_horizontalpodautoscaler_spec_max_replicas)
|
|
158
|
-
# for: 2m
|
|
159
|
-
# labels:
|
|
160
|
-
# severity: info
|
|
161
|
-
# annotations:
|
|
162
|
-
# summary: Kubernetes HPA scale maximum (instance {{ $labels.instance }})
|
|
163
|
-
# description: "HPA {{ $labels.namespace }}/{{ $labels.horizontalpodautoscaler }} has hit maximum number of desired pods\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
164
|
-
|
|
165
|
-
- alert: KubernetesHpaUnderutilized
|
|
166
|
-
expr: max(quantile_over_time(0.5, kube_horizontalpodautoscaler_status_desired_replicas[1d]) == kube_horizontalpodautoscaler_spec_min_replicas) by (horizontalpodautoscaler) > 3
|
|
167
|
-
for: 0m
|
|
168
|
-
labels:
|
|
169
|
-
severity: info
|
|
170
|
-
annotations:
|
|
171
|
-
summary: Kubernetes HPA underutilized (instance {{ $labels.instance }})
|
|
172
|
-
description: "HPA {{ $labels.namespace }}/{{ $labels.horizontalpodautoscaler }} is constantly at minimum replicas for 50% of the time. Potential cost saving here.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
173
|
-
|
|
174
|
-
- alert: KubernetesPodNotHealthy
|
|
175
|
-
expr: sum by (namespace, pod) (kube_pod_status_phase{phase=~"Pending|Unknown|Failed"}) > 0
|
|
176
|
-
for: 15m
|
|
177
|
-
labels:
|
|
178
|
-
severity: critical
|
|
179
|
-
annotations:
|
|
180
|
-
summary: Kubernetes Pod not healthy (instance {{ $labels.instance }})
|
|
181
|
-
description: "Pod {{ $labels.namespace }}/{{ $labels.pod }} has been in a non-running state for longer than 15 minutes.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
182
|
-
|
|
183
|
-
- alert: KubernetesPodCrashLooping
|
|
184
|
-
expr: increase(kube_pod_container_status_restarts_total[1m]) > 3
|
|
185
|
-
for: 2m
|
|
186
|
-
labels:
|
|
187
|
-
severity: warning
|
|
188
|
-
annotations:
|
|
189
|
-
summary: Kubernetes pod crash looping (instance {{ $labels.instance }})
|
|
190
|
-
description: "Pod {{ $labels.namespace }}/{{ $labels.pod }} is crash looping\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
191
|
-
|
|
192
|
-
- alert: KubernetesReplicasetReplicasMismatch
|
|
193
|
-
expr: kube_replicaset_spec_replicas != kube_replicaset_status_ready_replicas
|
|
194
|
-
for: 10m
|
|
195
|
-
labels:
|
|
196
|
-
severity: warning
|
|
197
|
-
annotations:
|
|
198
|
-
summary: Kubernetes ReplicaSet replicas mismatch (instance {{ $labels.instance }})
|
|
199
|
-
description: "ReplicaSet {{ $labels.namespace }}/{{ $labels.replicaset }} replicas mismatch\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
200
|
-
|
|
201
|
-
- alert: KubernetesDeploymentReplicasMismatch
|
|
202
|
-
expr: kube_deployment_spec_replicas != kube_deployment_status_replicas_available
|
|
203
|
-
for: 10m
|
|
204
|
-
labels:
|
|
205
|
-
severity: warning
|
|
206
|
-
annotations:
|
|
207
|
-
summary: Kubernetes Deployment replicas mismatch (instance {{ $labels.instance }})
|
|
208
|
-
description: "Deployment {{ $labels.namespace }}/{{ $labels.deployment }} replicas mismatch\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
209
|
-
|
|
210
|
-
- alert: KubernetesStatefulsetReplicasMismatch
|
|
211
|
-
expr: kube_statefulset_status_replicas_ready != kube_statefulset_status_replicas
|
|
212
|
-
for: 10m
|
|
213
|
-
labels:
|
|
214
|
-
severity: warning
|
|
215
|
-
annotations:
|
|
216
|
-
summary: Kubernetes StatefulSet replicas mismatch (instance {{ $labels.instance }})
|
|
217
|
-
description: "StatefulSet does not match the expected number of replicas.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
218
|
-
|
|
219
|
-
- alert: KubernetesDeploymentGenerationMismatch
|
|
220
|
-
expr: kube_deployment_status_observed_generation != kube_deployment_metadata_generation
|
|
221
|
-
for: 10m
|
|
222
|
-
labels:
|
|
223
|
-
severity: critical
|
|
224
|
-
annotations:
|
|
225
|
-
summary: Kubernetes Deployment generation mismatch (instance {{ $labels.instance }})
|
|
226
|
-
description: "Deployment {{ $labels.namespace }}/{{ $labels.deployment }} has failed but has not been rolled back.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
227
|
-
|
|
228
|
-
- alert: KubernetesStatefulsetGenerationMismatch
|
|
229
|
-
expr: kube_statefulset_status_observed_generation != kube_statefulset_metadata_generation
|
|
230
|
-
for: 10m
|
|
231
|
-
labels:
|
|
232
|
-
severity: critical
|
|
233
|
-
annotations:
|
|
234
|
-
summary: Kubernetes StatefulSet generation mismatch (instance {{ $labels.instance }})
|
|
235
|
-
description: "StatefulSet {{ $labels.namespace }}/{{ $labels.statefulset }} has failed but has not been rolled back.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
236
|
-
|
|
237
|
-
- alert: KubernetesStatefulsetUpdateNotRolledOut
|
|
238
|
-
expr: max without (revision) (kube_statefulset_status_current_revision unless kube_statefulset_status_update_revision) * (kube_statefulset_replicas != kube_statefulset_status_replicas_updated)
|
|
239
|
-
for: 10m
|
|
240
|
-
labels:
|
|
241
|
-
severity: warning
|
|
242
|
-
annotations:
|
|
243
|
-
summary: Kubernetes StatefulSet update not rolled out (instance {{ $labels.instance }})
|
|
244
|
-
description: "StatefulSet {{ $labels.namespace }}/{{ $labels.statefulset }} update has not been rolled out.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
245
|
-
|
|
246
|
-
- alert: KubernetesDaemonsetRolloutStuck
|
|
247
|
-
expr: kube_daemonset_status_number_ready / kube_daemonset_status_desired_number_scheduled * 100 < 100 or kube_daemonset_status_desired_number_scheduled - kube_daemonset_status_current_number_scheduled > 0
|
|
248
|
-
for: 10m
|
|
249
|
-
labels:
|
|
250
|
-
severity: warning
|
|
251
|
-
annotations:
|
|
252
|
-
summary: Kubernetes DaemonSet rollout stuck (instance {{ $labels.instance }})
|
|
253
|
-
description: "Some Pods of DaemonSet {{ $labels.namespace }}/{{ $labels.daemonset }} are not scheduled or not ready\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
254
|
-
|
|
255
|
-
- alert: KubernetesDaemonsetMisscheduled
|
|
256
|
-
expr: kube_daemonset_status_number_misscheduled > 0
|
|
257
|
-
for: 1m
|
|
258
|
-
labels:
|
|
259
|
-
severity: critical
|
|
260
|
-
annotations:
|
|
261
|
-
summary: Kubernetes DaemonSet misscheduled (instance {{ $labels.instance }})
|
|
262
|
-
description: "Some Pods of DaemonSet {{ $labels.namespace }}/{{ $labels.daemonset }} are running where they are not supposed to run\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
263
|
-
|
|
264
|
-
# Threshold should be customized for each cronjob name.
|
|
265
|
-
- alert: KubernetesCronjobTooLong
|
|
266
|
-
expr: time() - kube_cronjob_next_schedule_time > 3600
|
|
267
|
-
for: 0m
|
|
268
|
-
labels:
|
|
269
|
-
severity: warning
|
|
270
|
-
annotations:
|
|
271
|
-
summary: Kubernetes CronJob too long (instance {{ $labels.instance }})
|
|
272
|
-
description: "CronJob {{ $labels.namespace }}/{{ $labels.cronjob }} is taking more than 1h to complete.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
273
|
-
|
|
274
|
-
- alert: KubernetesJobSlowCompletion
|
|
275
|
-
expr: kube_job_spec_completions - kube_job_status_succeeded - kube_job_status_failed > 0
|
|
276
|
-
for: 12h
|
|
277
|
-
labels:
|
|
278
|
-
severity: critical
|
|
279
|
-
annotations:
|
|
280
|
-
summary: Kubernetes Job slow completion (instance {{ $labels.instance }})
|
|
281
|
-
description: "Kubernetes Job {{ $labels.namespace }}/{{ $labels.job_name }} did not complete in time.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
282
|
-
|
|
283
|
-
- alert: KubernetesApiServerErrors
|
|
284
|
-
expr: sum(rate(apiserver_request_total{job="apiserver",code=~"(?:5..)"}[1m])) by (instance, job) / sum(rate(apiserver_request_total{job="apiserver"}[1m])) by (instance, job) * 100 > 3
|
|
285
|
-
for: 2m
|
|
286
|
-
labels:
|
|
287
|
-
severity: critical
|
|
288
|
-
annotations:
|
|
289
|
-
summary: Kubernetes API server errors (instance {{ $labels.instance }})
|
|
290
|
-
description: "Kubernetes API server is experiencing high error rate\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
291
|
-
|
|
292
|
-
- alert: KubernetesApiClientErrors
|
|
293
|
-
expr: (sum(rate(rest_client_requests_total{code=~"(4|5).."}[1m])) by (instance, job) / sum(rate(rest_client_requests_total[1m])) by (instance, job)) * 100 > 1
|
|
294
|
-
for: 2m
|
|
295
|
-
labels:
|
|
296
|
-
severity: critical
|
|
297
|
-
annotations:
|
|
298
|
-
summary: Kubernetes API client errors (instance {{ $labels.instance }})
|
|
299
|
-
description: "Kubernetes API client is experiencing high error rate\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
300
|
-
|
|
301
|
-
- alert: KubernetesClientCertificateExpiresNextWeek
|
|
302
|
-
expr: apiserver_client_certificate_expiration_seconds_count{job="apiserver"} > 0 and histogram_quantile(0.01, sum by (job, le) (rate(apiserver_client_certificate_expiration_seconds_bucket{job="apiserver"}[5m]))) < 7*24*60*60
|
|
303
|
-
for: 0m
|
|
304
|
-
labels:
|
|
305
|
-
severity: warning
|
|
306
|
-
annotations:
|
|
307
|
-
summary: Kubernetes client certificate expires next week (instance {{ $labels.instance }})
|
|
308
|
-
description: "A client certificate used to authenticate to the apiserver is expiring next week.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
309
|
-
|
|
310
|
-
- alert: KubernetesClientCertificateExpiresSoon
|
|
311
|
-
expr: apiserver_client_certificate_expiration_seconds_count{job="apiserver"} > 0 and histogram_quantile(0.01, sum by (job, le) (rate(apiserver_client_certificate_expiration_seconds_bucket{job="apiserver"}[5m]))) < 24*60*60
|
|
312
|
-
for: 0m
|
|
313
|
-
labels:
|
|
314
|
-
severity: critical
|
|
315
|
-
annotations:
|
|
316
|
-
summary: Kubernetes client certificate expires soon (instance {{ $labels.instance }})
|
|
317
|
-
description: "A client certificate used to authenticate to the apiserver is expiring in less than 24.0 hours.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
318
|
-
|
|
319
|
-
- alert: KubernetesApiServerLatency
|
|
320
|
-
expr: histogram_quantile(0.99, sum(rate(apiserver_request_duration_seconds_bucket{verb!~"(?:CONNECT|WATCHLIST|WATCH|PROXY)"} [10m])) WITHOUT (subresource)) > 1
|
|
321
|
-
for: 2m
|
|
322
|
-
labels:
|
|
323
|
-
severity: warning
|
|
324
|
-
annotations:
|
|
325
|
-
summary: Kubernetes API server latency (instance {{ $labels.instance }})
|
|
326
|
-
description: "Kubernetes API server has a 99th percentile latency of {{ $value }} seconds for {{ $labels.verb }} {{ $labels.resource }}.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
apiVersion: monitoring.coreos.com/v1
|
|
2
|
-
kind: PrometheusRule
|
|
3
|
-
metadata:
|
|
4
|
-
name: kubernetes-rules
|
|
5
|
-
namespace: prometheus
|
|
6
|
-
|
|
7
|
-
spec:
|
|
8
|
-
groups:
|
|
9
|
-
- name: Kubernetes
|
|
10
|
-
rules:
|
|
11
|
-
- alert: KubernetesNodeNotReady
|
|
12
|
-
expr: kube_node_status_condition{condition="Ready",status="true"} == 0
|
|
13
|
-
for: 5m
|
|
14
|
-
labels:
|
|
15
|
-
severity: page
|
|
16
|
-
priority: P3
|
|
17
|
-
annotations:
|
|
18
|
-
summary: "Kubernetes Node is not ready"
|
|
19
|
-
description: "Node {{ $labels.node }} is stuck in unready state for more than 5m"
|
|
20
|
-
dashboard: "Check GKE or EKS node status"
|
|
21
|
-
|
|
22
|
-
- alert: KubernetesMemoryPressure
|
|
23
|
-
expr: kube_node_status_condition{condition="MemoryPressure",status="true"} == 1
|
|
24
|
-
for: 5m
|
|
25
|
-
labels:
|
|
26
|
-
severity: error
|
|
27
|
-
annotations:
|
|
28
|
-
summary: "Kubernetes memory pressure"
|
|
29
|
-
description: "{{ $labels.node }} has a MemoryPressure condition"
|
|
30
|
-
dashboard: "Check GKE or EKS node status"
|
|
31
|
-
|
|
32
|
-
- alert: KubernetesDiskPressure
|
|
33
|
-
expr: kube_node_status_condition{condition="DiskPressure",status="true"} == 1
|
|
34
|
-
for: 5m
|
|
35
|
-
labels:
|
|
36
|
-
severity: error
|
|
37
|
-
annotations:
|
|
38
|
-
summary: "Kubernetes disk pressure"
|
|
39
|
-
description: "{{ $labels.node }} has DiskPressure condition"
|
|
40
|
-
dashboard: "Check GKE or EKS node status"
|
|
41
|
-
|
|
42
|
-
- alert: KubernetesOutOfDisk
|
|
43
|
-
expr: kube_node_status_condition{condition="OutOfDisk",status="true"} == 1
|
|
44
|
-
for: 5m
|
|
45
|
-
labels:
|
|
46
|
-
severity: error
|
|
47
|
-
annotations:
|
|
48
|
-
summary: "Kubernetes out of disk"
|
|
49
|
-
description: "{{ $labels.node }} has is out of disk space"
|
|
50
|
-
dashboard: "Check GKE or EKS node status"
|
|
51
|
-
|
|
52
|
-
- alert: KubernetesVolumeOutOfDiskSpace
|
|
53
|
-
expr: kubelet_volume_stats_available_bytes / kubelet_volume_stats_capacity_bytes * 100 < 10
|
|
54
|
-
for: 5m
|
|
55
|
-
labels:
|
|
56
|
-
severity: error
|
|
57
|
-
priority: P2
|
|
58
|
-
annotations:
|
|
59
|
-
summary: "Kubernetes PVC Free Space < 10%"
|
|
60
|
-
description: "PVC volume {{ $labels.persistentvolumeclaim }} is almost full - down to {{ $value | humanize }}% available"
|
|
61
|
-
|
|
62
|
-
# - alert: KubernetesVolumeFullInFourDays
|
|
63
|
-
# expr: predict_linear(kubelet_volume_stats_available_bytes[6h], 4 * 24 * 3600) < 0
|
|
64
|
-
# for: 5m
|
|
65
|
-
# labels:
|
|
66
|
-
# severity: error
|
|
67
|
-
# annotations:
|
|
68
|
-
# summary: "Kubernetes Volume full in four days "
|
|
69
|
-
# description: "{{ $labels.namespace }}/{{ $labels.persistentvolumeclaim }} is expected to fill up within four days. Currently {{ $value | humanize }}% is available."
|
|
70
|
-
|
|
71
|
-
- alert: KubernetesPersistentvolumeError
|
|
72
|
-
expr: kube_persistentvolume_status_phase{phase=~"Failed|Pending",job="kube-state-metrics"} > 0
|
|
73
|
-
for: 5m
|
|
74
|
-
labels:
|
|
75
|
-
severity: error
|
|
76
|
-
annotations:
|
|
77
|
-
summary: "Kubernetes PersistentVolume error "
|
|
78
|
-
description: "PersistentVolumeClaim {{ $labels.namespace }}/{{ $labels.persistentvolumeclaim }} is stuck pending"
|
|
79
|
-
dashboard: "Check GKE or EKS PVC/storage status"
|
|
80
|
-
|
|
81
|
-
- alert: KubernetesHpaScaleCapability
|
|
82
|
-
expr: kube_hpa_status_desired_replicas >= kube_hpa_spec_max_replicas
|
|
83
|
-
for: 15m
|
|
84
|
-
labels:
|
|
85
|
-
severity: warning
|
|
86
|
-
annotations:
|
|
87
|
-
summary: "Kubernetes HPA scale capability"
|
|
88
|
-
description: "Kubernetes has scaled {{ $labels.hpa }} to max number of scaled pods."
|
|
89
|
-
|
|
90
|
-
- alert: KubernetesPodNotHealthy
|
|
91
|
-
expr: kube_pod_status_phase{phase=~"Pending|Unknown|Failed"} == 1
|
|
92
|
-
for: 20m
|
|
93
|
-
labels:
|
|
94
|
-
severity: error
|
|
95
|
-
annotations:
|
|
96
|
-
summary: "Kubernetes Pod not healthy"
|
|
97
|
-
description: "Pod {{ $labels.pod }} has been in a non-ready state for longer than 20 minutes."
|
|
98
|
-
dashboard: "Check the pod status using the Kubernetes UI"
|
|
99
|
-
|
|
100
|
-
- alert: KubernetesPodCrashLooping
|
|
101
|
-
expr: rate(kube_pod_container_status_restarts_total[15m]) * 60 * 5 > 5
|
|
102
|
-
for: 5m
|
|
103
|
-
labels:
|
|
104
|
-
severity: page
|
|
105
|
-
priority: P2
|
|
106
|
-
annotations:
|
|
107
|
-
summary: "Kubernetes pod crash looping"
|
|
108
|
-
description: "{{ $labels.pod }} is in a crash loop"
|
|
109
|
-
dashboard: "Check the pod status using the Kubernetes UI"
|