@leverege/build-tools 2.55.0 → 2.55.2
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 +5 -5
- package/src/helm-charts/prom-operator/grafana-dashboards/cloudnative-pg.json +9190 -0
- package/src/helm-charts/prom-operator/grafana-dashboards/redis.json +1513 -0
- package/src/helm-charts/prom-operator/grafana-dashboards/stackdriver.json +624 -0
- package/src/helm-charts/prom-operator/grafana-dashboards/traefik-op.json +1386 -0
- package/src/helm-charts/prom-operator/helmdn.plugin +2 -2
- package/src/helm-charts/prom-operator/helmup.plugin +1 -1
- package/src/helm-charts/prom-operator/prometheus-stack.yaml.ovh +2 -4
- package/src/helm-charts/prom-operator/rules/test-alert.yaml +18 -0
- package/src/helm-charts/prom-operator/stackdriver-exporter.yaml.ovh +6 -1
- package/src/helm-charts/redis/helmup.plugin +1 -1
- package/src/helm-charts/redis/redis-local.yaml +5 -0
- package/src/helm-charts/traefik/helmup.plugin +2 -2
- package/src/k8x.sh +4 -0
- package/src/helm-charts/prom-operator/rules/kubernetes-rules.yaml.off +0 -112
- package/src/helm-charts/prom-operator/rules/prometheus-rules.yaml.off +0 -79
- package/src/helm-charts/prometheus-operator/.nohelm +0 -0
- package/src/helm-charts/prometheus-operator/helmup.plugin +0 -14
- package/src/helm-charts/prometheus-operator/old-values-local.yaml +0 -764
- package/src/helm-charts/prometheus-operator/prometheus-stack.yaml +0 -59
|
@@ -1,764 +0,0 @@
|
|
|
1
|
-
server:
|
|
2
|
-
global:
|
|
3
|
-
external_labels:
|
|
4
|
-
cluster: "OVH:<CLUSTER_NAME>"
|
|
5
|
-
affinity:
|
|
6
|
-
nodeAffinity:
|
|
7
|
-
requiredDuringSchedulingIgnoredDuringExecution:
|
|
8
|
-
nodeSelectorTerms:
|
|
9
|
-
- matchExpressions:
|
|
10
|
-
- key: target-env
|
|
11
|
-
operator: In
|
|
12
|
-
values:
|
|
13
|
-
- database
|
|
14
|
-
tolerations:
|
|
15
|
-
- key: "database"
|
|
16
|
-
operator: "Equal"
|
|
17
|
-
value: "true"
|
|
18
|
-
effect: "NoSchedule"
|
|
19
|
-
retention: "30d"
|
|
20
|
-
persistentVolume:
|
|
21
|
-
size: 50Gi
|
|
22
|
-
resources:
|
|
23
|
-
limits:
|
|
24
|
-
memory: 4Gi
|
|
25
|
-
requests:
|
|
26
|
-
memory: 2Gi
|
|
27
|
-
strategy:
|
|
28
|
-
type: Recreate
|
|
29
|
-
|
|
30
|
-
pushgateway:
|
|
31
|
-
enabled: false
|
|
32
|
-
|
|
33
|
-
# name change with chart 19+
|
|
34
|
-
prometheus-pushgateway:
|
|
35
|
-
enabled: false
|
|
36
|
-
|
|
37
|
-
# temp set to false if upgrade errors with something like:
|
|
38
|
-
# Error: UPGRADE FAILED: cannot patch "prometheus-kube-state-metrics" ... field is immutable
|
|
39
|
-
#
|
|
40
|
-
kubeStateMetrics:
|
|
41
|
-
enabled: true
|
|
42
|
-
|
|
43
|
-
alertmanager:
|
|
44
|
-
affinity:
|
|
45
|
-
nodeAffinity:
|
|
46
|
-
requiredDuringSchedulingIgnoredDuringExecution:
|
|
47
|
-
nodeSelectorTerms:
|
|
48
|
-
- matchExpressions:
|
|
49
|
-
- key: target-env
|
|
50
|
-
operator: In
|
|
51
|
-
values:
|
|
52
|
-
- database
|
|
53
|
-
tolerations:
|
|
54
|
-
- key: "database"
|
|
55
|
-
operator: "Equal"
|
|
56
|
-
value: "true"
|
|
57
|
-
effect: "NoSchedule"
|
|
58
|
-
|
|
59
|
-
strategy:
|
|
60
|
-
type: Recreate
|
|
61
|
-
|
|
62
|
-
config:
|
|
63
|
-
receivers:
|
|
64
|
-
- name: slack
|
|
65
|
-
slack_configs:
|
|
66
|
-
- channel: "OVH:<SLACK_CHANNEL>"
|
|
67
|
-
api_url: "OVH:<SLACK_HOOK_URL>"
|
|
68
|
-
username: "OVH:<PROJECT_NAME>"
|
|
69
|
-
fallback: "OVH:<PROJECT_NAME> - {{ .CommonAnnotations.summary }}"
|
|
70
|
-
title: "{{ range .Alerts }}{{ .Annotations.summary }}\n{{ end }}"
|
|
71
|
-
title_link: "https://bitbucket.org/leverege/sre-playbook/src/master/"
|
|
72
|
-
send_resolved: true
|
|
73
|
-
text: |-
|
|
74
|
-
{{ range .Alerts }}
|
|
75
|
-
*Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}`
|
|
76
|
-
*Description:* {{ .Annotations.description }}
|
|
77
|
-
*Dashboard:* {{ .Annotations.dashboard }}
|
|
78
|
-
{{ end }}
|
|
79
|
-
- name: opsgenie
|
|
80
|
-
opsgenie_configs:
|
|
81
|
-
- api_key: "OVH:<OPSGENIE_APIKEY>"
|
|
82
|
-
priority: "{{ .CommonLabels.priority }}"
|
|
83
|
-
tags: "{{ range .Alerts }}{{ .Labels.severity }},{{ end }}"
|
|
84
|
-
description: |-
|
|
85
|
-
{{ range .Alerts }}
|
|
86
|
-
*Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}`
|
|
87
|
-
*Description:* {{ .Annotations.description }}
|
|
88
|
-
*Dashboard:* {{ .Annotations.dashboard }}
|
|
89
|
-
{{ end }}
|
|
90
|
-
|
|
91
|
-
route:
|
|
92
|
-
group_wait: 10s
|
|
93
|
-
group_interval: 5m
|
|
94
|
-
group_by:
|
|
95
|
-
- alertname
|
|
96
|
-
- cluster
|
|
97
|
-
receiver: slack
|
|
98
|
-
routes:
|
|
99
|
-
- match:
|
|
100
|
-
severity: page
|
|
101
|
-
receiver: opsgenie
|
|
102
|
-
repeat_interval: 6h
|
|
103
|
-
|
|
104
|
-
serverFiles:
|
|
105
|
-
alerting_rules.yml:
|
|
106
|
-
groups:
|
|
107
|
-
|
|
108
|
-
- name: Kubernetes
|
|
109
|
-
rules:
|
|
110
|
-
- alert: KubernetesNodeNotReady
|
|
111
|
-
expr: kube_node_status_condition{condition="Ready",status="true"} == 0
|
|
112
|
-
for: 5m
|
|
113
|
-
labels:
|
|
114
|
-
severity: page
|
|
115
|
-
priority: P3
|
|
116
|
-
annotations:
|
|
117
|
-
summary: "Kubernetes Node is not ready"
|
|
118
|
-
description: "Node {{ $labels.node }} is stuck in unready state for more than 5m"
|
|
119
|
-
dashboard: "Check GKE or EKS node status"
|
|
120
|
-
|
|
121
|
-
- alert: KubernetesMemoryPressure
|
|
122
|
-
expr: kube_node_status_condition{condition="MemoryPressure",status="true"} == 1
|
|
123
|
-
for: 5m
|
|
124
|
-
labels:
|
|
125
|
-
severity: error
|
|
126
|
-
annotations:
|
|
127
|
-
summary: "Kubernetes memory pressure"
|
|
128
|
-
description: "{{ $labels.node }} has a MemoryPressure condition"
|
|
129
|
-
dashboard: "Check GKE or EKS node status"
|
|
130
|
-
|
|
131
|
-
- alert: KubernetesDiskPressure
|
|
132
|
-
expr: kube_node_status_condition{condition="DiskPressure",status="true"} == 1
|
|
133
|
-
for: 5m
|
|
134
|
-
labels:
|
|
135
|
-
severity: error
|
|
136
|
-
annotations:
|
|
137
|
-
summary: "Kubernetes disk pressure"
|
|
138
|
-
description: "{{ $labels.node }} has DiskPressure condition"
|
|
139
|
-
dashboard: "Check GKE or EKS node status"
|
|
140
|
-
|
|
141
|
-
- alert: KubernetesOutOfDisk
|
|
142
|
-
expr: kube_node_status_condition{condition="OutOfDisk",status="true"} == 1
|
|
143
|
-
for: 5m
|
|
144
|
-
labels:
|
|
145
|
-
severity: error
|
|
146
|
-
annotations:
|
|
147
|
-
summary: "Kubernetes out of disk"
|
|
148
|
-
description: "{{ $labels.node }} has is out of disk space"
|
|
149
|
-
dashboard: "Check GKE or EKS node status"
|
|
150
|
-
|
|
151
|
-
- alert: KubernetesVolumeOutOfDiskSpace
|
|
152
|
-
expr: kubelet_volume_stats_available_bytes / kubelet_volume_stats_capacity_bytes * 100 < 10
|
|
153
|
-
for: 5m
|
|
154
|
-
labels:
|
|
155
|
-
severity: error
|
|
156
|
-
priority: P2
|
|
157
|
-
annotations:
|
|
158
|
-
summary: "Kubernetes PVC Free Space < 10%"
|
|
159
|
-
description: "PVC volume {{ $labels.persistentvolumeclaim }} is almost full - down to {{ $value | humanize }}% available"
|
|
160
|
-
dashboard: "OVH:<MONITORING>/k8s-pvc/pvc-usage?var-volume={{ $labels.persistentvolumeclaim }}"
|
|
161
|
-
|
|
162
|
-
# - alert: KubernetesVolumeFullInFourDays
|
|
163
|
-
# expr: predict_linear(kubelet_volume_stats_available_bytes[6h], 4 * 24 * 3600) < 0
|
|
164
|
-
# for: 5m
|
|
165
|
-
# labels:
|
|
166
|
-
# severity: error
|
|
167
|
-
# annotations:
|
|
168
|
-
# summary: "Kubernetes Volume full in four days "
|
|
169
|
-
# description: "{{ $labels.namespace }}/{{ $labels.persistentvolumeclaim }} is expected to fill up within four days. Currently {{ $value | humanize }}% is available."
|
|
170
|
-
# dashboard: "OVH:<MONITORING>/pvc"
|
|
171
|
-
|
|
172
|
-
- alert: KubernetesPersistentvolumeError
|
|
173
|
-
expr: kube_persistentvolume_status_phase{phase=~"Failed|Pending",job="kube-state-metrics"} > 0
|
|
174
|
-
for: 5m
|
|
175
|
-
labels:
|
|
176
|
-
severity: error
|
|
177
|
-
annotations:
|
|
178
|
-
summary: "Kubernetes PersistentVolume error "
|
|
179
|
-
description: "PersistentVolumeClaim {{ $labels.namespace }}/{{ $labels.persistentvolumeclaim }} is stuck pending"
|
|
180
|
-
dashboard: "Check GKE or EKS PVC/storage status"
|
|
181
|
-
|
|
182
|
-
- alert: KubernetesHpaScaleCapability
|
|
183
|
-
expr: kube_hpa_status_desired_replicas >= kube_hpa_spec_max_replicas
|
|
184
|
-
for: 15m
|
|
185
|
-
labels:
|
|
186
|
-
severity: warning
|
|
187
|
-
annotations:
|
|
188
|
-
summary: "Kubernetes HPA scale capability"
|
|
189
|
-
description: "Kubernetes has scaled {{ $labels.hpa }} to max number of scaled pods."
|
|
190
|
-
dashboard: "OVH:<MONITORING>/k8-deployment"
|
|
191
|
-
|
|
192
|
-
- alert: KubernetesPodNotHealthy
|
|
193
|
-
expr: kube_pod_status_phase{phase=~"Pending|Unknown|Failed"} == 1
|
|
194
|
-
for: 20m
|
|
195
|
-
labels:
|
|
196
|
-
severity: error
|
|
197
|
-
annotations:
|
|
198
|
-
summary: "Kubernetes Pod not healthy"
|
|
199
|
-
description: "Pod {{ $labels.pod }} has been in a non-ready state for longer than 20 minutes."
|
|
200
|
-
dashboard: "Check the pod status using the Kubernetes UI"
|
|
201
|
-
|
|
202
|
-
- alert: KubernetesPodCrashLooping
|
|
203
|
-
expr: rate(kube_pod_container_status_restarts_total[15m]) * 60 * 5 > 5
|
|
204
|
-
for: 5m
|
|
205
|
-
labels:
|
|
206
|
-
severity: page
|
|
207
|
-
priority: P2
|
|
208
|
-
annotations:
|
|
209
|
-
summary: "Kubernetes pod crash looping"
|
|
210
|
-
description: "{{ $labels.pod }} is in a crash loop"
|
|
211
|
-
dashboard: "Check the pod status using the Kubernetes UI"
|
|
212
|
-
|
|
213
|
-
- name: Prometheus
|
|
214
|
-
rules:
|
|
215
|
-
- alert: targets_down
|
|
216
|
-
expr: up{target_env!="preemptibles"} == 0
|
|
217
|
-
for: 10m
|
|
218
|
-
labels:
|
|
219
|
-
severity: warning
|
|
220
|
-
annotations:
|
|
221
|
-
summary: Prometheus target missing
|
|
222
|
-
description: "Prometheus failed to scrape {{ $labels.app }}"
|
|
223
|
-
dashboard: "See prometheus.md in SRE Playbook"
|
|
224
|
-
|
|
225
|
-
- alert: PrometheusConfigurationReloadFailure
|
|
226
|
-
expr: prometheus_config_last_reload_successful != 1
|
|
227
|
-
for: 5m
|
|
228
|
-
labels:
|
|
229
|
-
severity: warning
|
|
230
|
-
annotations:
|
|
231
|
-
summary: "Prometheus server configuration reload failure"
|
|
232
|
-
description: "Prometheus server failed to reload server configs (e.g. alerts, rules)"
|
|
233
|
-
dashboard: "See prometheus.md in SRE Playbook"
|
|
234
|
-
|
|
235
|
-
- alert: PrometheusAlertmanagerConfigurationReloadFailure
|
|
236
|
-
expr: alertmanager_config_last_reload_successful != 1
|
|
237
|
-
for: 5m
|
|
238
|
-
labels:
|
|
239
|
-
severity: warning
|
|
240
|
-
annotations:
|
|
241
|
-
summary: "Prometheus AlertManager configuration reload failure"
|
|
242
|
-
description: "AlertManager failed to reload alert configs (e.g. slack, opsgenie)"
|
|
243
|
-
dashboard: "See prometheus.md in SRE Playbook"
|
|
244
|
-
|
|
245
|
-
- alert: PrometheusTooManyRestarts
|
|
246
|
-
expr: changes(process_start_time_seconds{job=~"prometheus|alertmanager"}[15m]) > 2
|
|
247
|
-
for: 5m
|
|
248
|
-
labels:
|
|
249
|
-
severity: warning
|
|
250
|
-
annotations:
|
|
251
|
-
summary: "Prometheus is in a crash loop"
|
|
252
|
-
description: "Prometheus {{ $labels.component }} has restarted more than twice in the last 15 minutes. It might be crashlooping."
|
|
253
|
-
dashboard: "See prometheus.md in SRE Playbook"
|
|
254
|
-
|
|
255
|
-
- alert: PrometheusNotConnectedToAlertmanager
|
|
256
|
-
expr: prometheus_notifications_alertmanagers_discovered < 1
|
|
257
|
-
for: 5m
|
|
258
|
-
labels:
|
|
259
|
-
severity: error
|
|
260
|
-
annotations:
|
|
261
|
-
summary: "Prometheus not connected to alertmanager"
|
|
262
|
-
description: "Prometheus cannot connect the alertmanager - new alerts may not be detected"
|
|
263
|
-
dashboard: "See prometheus.md in SRE Playbook"
|
|
264
|
-
|
|
265
|
-
- alert: PrometheusNotificationsBacklog
|
|
266
|
-
expr: min_over_time(prometheus_notifications_queue_length[10m]) > 0
|
|
267
|
-
for: 5m
|
|
268
|
-
labels:
|
|
269
|
-
severity: warning
|
|
270
|
-
annotations:
|
|
271
|
-
summary: "Prometheus notifications backlog"
|
|
272
|
-
description: "The Prometheus notification queue has not been empty for 10 minutes"
|
|
273
|
-
dashboard: "See prometheus.md in SRE Playbook"
|
|
274
|
-
|
|
275
|
-
- alert: PrometheusAlertmanagerNotificationFailing
|
|
276
|
-
expr: rate(alertmanager_notifications_failed_total[1m]) > 0
|
|
277
|
-
for: 5m
|
|
278
|
-
labels:
|
|
279
|
-
severity: error
|
|
280
|
-
annotations:
|
|
281
|
-
summary: "Prometheus AlertManager notification failing"
|
|
282
|
-
description: "Alertmanager is failing to send notifications"
|
|
283
|
-
dashboard: "See prometheus.md in SRE Playbook"
|
|
284
|
-
|
|
285
|
-
- name: GCP
|
|
286
|
-
rules:
|
|
287
|
-
- alert: StackdriverFailedScrape
|
|
288
|
-
expr: absent(stackdriver_pubsub_topic_pubsub_googleapis_com_topic_message_sizes_count) == 1
|
|
289
|
-
for: 10m
|
|
290
|
-
labels:
|
|
291
|
-
severity: warning
|
|
292
|
-
annotations:
|
|
293
|
-
summary: "Stackdriver metrics unavailable"
|
|
294
|
-
description: "Prometheus failed to scrape Stackdriver metrics"
|
|
295
|
-
dashboard: "Use Stackdriver Monitoring on GCP UI"
|
|
296
|
-
- alert: HighFirebaseLoad
|
|
297
|
-
expr: stackdriver_firebase_namespace_firebasedatabase_googleapis_com_io_database_load > 0.9
|
|
298
|
-
for: 5m
|
|
299
|
-
labels:
|
|
300
|
-
severity: warning
|
|
301
|
-
annotations:
|
|
302
|
-
summary: "High Firebase load detected"
|
|
303
|
-
description: "Firebase load is above 90% (current value is: {{ $value | humanize }}%)"
|
|
304
|
-
dashboard: "OVH:<MONITORING>/firebase"
|
|
305
|
-
- alert: PubSubUndeliveredMessages
|
|
306
|
-
expr: sum(stackdriver_pubsub_subscription_pubsub_googleapis_com_subscription_num_undelivered_messages) by (subscription_id) > 1000
|
|
307
|
-
for: 5m
|
|
308
|
-
labels:
|
|
309
|
-
severity: page
|
|
310
|
-
priority: P3
|
|
311
|
-
annotations:
|
|
312
|
-
summary: "High Number of Undelivered Messages on PubSub"
|
|
313
|
-
description: "Undelivered message count on topic {{$labels.subscription_id}} is greater than 1000"
|
|
314
|
-
dashboard: "OVH:<MONITORING>/stackdriver"
|
|
315
|
-
- alert: PubSubOldUnackedMessages
|
|
316
|
-
expr: stackdriver_pubsub_subscription_pubsub_googleapis_com_subscription_oldest_unacked_message_age > 900
|
|
317
|
-
for: 5m
|
|
318
|
-
labels:
|
|
319
|
-
severity: warning
|
|
320
|
-
annotations:
|
|
321
|
-
summary: "Old messages left unacked on PubSub"
|
|
322
|
-
description: "Messages on {{$labels.subscription_id}} has been unacked for more than 15m"
|
|
323
|
-
dashboard: "OVH:<MONITORING>/stackdriver"
|
|
324
|
-
|
|
325
|
-
- name: Apps
|
|
326
|
-
rules:
|
|
327
|
-
- alert: frequent_app_restarts
|
|
328
|
-
expr: rate(nodejs_app_exit_count[15m]) * 60 * 5 > 5
|
|
329
|
-
for: 1m
|
|
330
|
-
labels:
|
|
331
|
-
severity: page
|
|
332
|
-
priority: P2
|
|
333
|
-
annotations:
|
|
334
|
-
summary: Apps are restarting frequently
|
|
335
|
-
description: "{{ $labels.app }} is in a crash loop"
|
|
336
|
-
dashboard: "OVH:<MONITORING>/stackdriver"
|
|
337
|
-
|
|
338
|
-
- name: Postgres
|
|
339
|
-
rules:
|
|
340
|
-
- alert: PostgresqlDown
|
|
341
|
-
expr: pg_up == 0
|
|
342
|
-
for: 5m
|
|
343
|
-
labels:
|
|
344
|
-
severity: page
|
|
345
|
-
priority: P3
|
|
346
|
-
annotations:
|
|
347
|
-
summary: "Postgresql down"
|
|
348
|
-
description: "Postgresql instance is down: check {{ $labels.release }}"
|
|
349
|
-
dashboard: "OVH:<MONITORING>/postgres"
|
|
350
|
-
|
|
351
|
-
- alert: PostgresqlRestarted
|
|
352
|
-
expr: time() - pg_postmaster_start_time_seconds < 60
|
|
353
|
-
for: 5m
|
|
354
|
-
labels:
|
|
355
|
-
severity: error
|
|
356
|
-
annotations:
|
|
357
|
-
summary: "Postgresql restarted"
|
|
358
|
-
description: "Postgresql restarted: check {{ $labels.release }}"
|
|
359
|
-
dashboard: "OVH:<MONITORING>/postgres"
|
|
360
|
-
|
|
361
|
-
- alert: PostgresqlExporterError
|
|
362
|
-
expr: pg_exporter_last_scrape_error > 0
|
|
363
|
-
for: 5m
|
|
364
|
-
labels:
|
|
365
|
-
severity: warning
|
|
366
|
-
annotations:
|
|
367
|
-
summary: "Postgresql exporter error for {{ $labels.release }}"
|
|
368
|
-
description: "Postgresql exporter is showing errors. Metrics may be outdated"
|
|
369
|
-
dashboard: "OVH:<MONITORING>/postgres"
|
|
370
|
-
|
|
371
|
-
- alert: PostgresqlReplicationLag
|
|
372
|
-
expr: (pg_replication_lag > 10) and ON(instance) (pg_replication_is_replica == 1)
|
|
373
|
-
for: 5m
|
|
374
|
-
labels:
|
|
375
|
-
severity: warning
|
|
376
|
-
annotations:
|
|
377
|
-
summary: "Postgresql replication lag"
|
|
378
|
-
description: "PostgreSQL replication lag is going up (> 10s): check {{ $labels.release }}"
|
|
379
|
-
dashboard: "OVH:<MONITORING>/postgres"
|
|
380
|
-
|
|
381
|
-
- alert: PostgresqlTableNotVacuumed
|
|
382
|
-
expr: (pg_stat_user_tables_last_autovacuum > 0) and (time() - pg_stat_user_tables_last_autovacuum > 60 * 60 * 24)
|
|
383
|
-
for: 5m
|
|
384
|
-
labels:
|
|
385
|
-
severity: warning
|
|
386
|
-
annotations:
|
|
387
|
-
summary: "Postgresql table not vacuumed"
|
|
388
|
-
description: "Table has not been vacuum for 24 hours: check {{ $labels.instance }}"
|
|
389
|
-
dashboard: "OVH:<MONITORING>/postgres"
|
|
390
|
-
|
|
391
|
-
- alert: PostgresqlTableNotAutoAnalyzed
|
|
392
|
-
expr: (pg_stat_user_tables_last_autoanalyze > 0) and (time() - pg_stat_user_tables_last_autoanalyze > 60 * 60 * 24)
|
|
393
|
-
for: 5m
|
|
394
|
-
labels:
|
|
395
|
-
severity: warning
|
|
396
|
-
annotations:
|
|
397
|
-
summary: "Postgresql table not analyzed (instance {{ $labels.instance }})"
|
|
398
|
-
description: "Table {{ $labels.relname }} has not been analyzed for 24 hours: check {{ $labels.release }} - {{ $labels.datname }}"
|
|
399
|
-
dashboard: "OVH:<MONITORING>/postgres"
|
|
400
|
-
|
|
401
|
-
- alert: PostgresqlDeadLocks
|
|
402
|
-
expr: rate(pg_stat_database_deadlocks{datname!~"template.*|postgres"}[1m]) > 0
|
|
403
|
-
for: 5m
|
|
404
|
-
labels:
|
|
405
|
-
severity: warning
|
|
406
|
-
annotations:
|
|
407
|
-
summary: "Postgresql dead locks"
|
|
408
|
-
description: "PostgreSQL has dead-locks: check {{ $labels.release }} - {{ $labels.datname }}"
|
|
409
|
-
dashboard: "OVH:<MONITORING>/postgres"
|
|
410
|
-
|
|
411
|
-
- alert: PostgresqlSlowQueries
|
|
412
|
-
expr: pg_slow_queries > 0
|
|
413
|
-
for: 5m
|
|
414
|
-
labels:
|
|
415
|
-
severity: warning
|
|
416
|
-
annotations:
|
|
417
|
-
summary: "Postgresql slow queries"
|
|
418
|
-
description: "PostgreSQL executing slow queries"
|
|
419
|
-
dashboard: "OVH:<MONITORING>/postgres"
|
|
420
|
-
|
|
421
|
-
- alert: PostgresqlHighRollbackRate
|
|
422
|
-
expr: rate(pg_stat_database_xact_rollback{datname!~"template.*"}[3m]) / rate(pg_stat_database_xact_commit{datname!~"template.*"}[3m]) > 0.02
|
|
423
|
-
for: 5m
|
|
424
|
-
labels:
|
|
425
|
-
severity: warning
|
|
426
|
-
annotations:
|
|
427
|
-
summary: "Postgresql high rollback rate on {{ $labels.release }} - {{ $labels.datname }}"
|
|
428
|
-
description: "Ratio of transactions being aborted compared to committed is > 2 %"
|
|
429
|
-
dashboard: "OVH:<MONITORING>/postgres"
|
|
430
|
-
|
|
431
|
-
- alert: PostgresqlCommitRateLow
|
|
432
|
-
expr: rate(pg_stat_database_xact_commit[1m]) < 10
|
|
433
|
-
for: 5m
|
|
434
|
-
labels:
|
|
435
|
-
severity: error
|
|
436
|
-
annotations:
|
|
437
|
-
summary: "Postgresql commit rate low on {{ $labels.release }} - {{ $labels.datname }}"
|
|
438
|
-
description: "Postgres seems to be processing very few transactions"
|
|
439
|
-
dashboard: "OVH:<MONITORING>/postgres"
|
|
440
|
-
|
|
441
|
-
- alert: PostgresqlLowXidConsumption
|
|
442
|
-
expr: rate(pg_txid_current[1m]) < 5
|
|
443
|
-
for: 5m
|
|
444
|
-
labels:
|
|
445
|
-
severity: warning
|
|
446
|
-
annotations:
|
|
447
|
-
summary: "Postgresql low XID consumption on {{ $labels.release }} - {{ $labels.datname }}"
|
|
448
|
-
description: "Postgresql seems to be consuming transaction IDs very slowly"
|
|
449
|
-
dashboard: "OVH:<MONITORING>/postgres"
|
|
450
|
-
|
|
451
|
-
- alert: PostgresqllowXlogConsumption
|
|
452
|
-
expr: rate(pg_xlog_position_bytes[1m]) < 100
|
|
453
|
-
for: 5m
|
|
454
|
-
labels:
|
|
455
|
-
severity: warning
|
|
456
|
-
annotations:
|
|
457
|
-
summary: "Postgresqllow XLOG consumption on {{ $labels.release }} - {{ $labels.datname }}"
|
|
458
|
-
description: "Postgres seems to be consuming XLOG very slowly"
|
|
459
|
-
dashboard: "OVH:<MONITORING>/postgres"
|
|
460
|
-
|
|
461
|
-
- alert: PostgresqlWaleReplicationStopped
|
|
462
|
-
expr: rate(pg_xlog_position_bytes[1m]) == 0
|
|
463
|
-
for: 5m
|
|
464
|
-
labels:
|
|
465
|
-
severity: error
|
|
466
|
-
annotations:
|
|
467
|
-
summary: "Postgresql WAL-E replication stopped on {{ $labels.release }} - {{ $labels.datname }}"
|
|
468
|
-
description: "WAL-E replication seems to be stopped"
|
|
469
|
-
dashboard: "OVH:<MONITORING>/postgres"
|
|
470
|
-
|
|
471
|
-
- alert: PostgresqlHighRateStatementTimeout
|
|
472
|
-
expr: rate(postgresql_errors_total{type="statement_timeout"}[5m]) > 3
|
|
473
|
-
for: 5m
|
|
474
|
-
labels:
|
|
475
|
-
severity: error
|
|
476
|
-
annotations:
|
|
477
|
-
summary: "Postgresql high rate statement timeout"
|
|
478
|
-
description: "Postgres transactions showing high rate of statement timeouts on {{ $labels.release }} - {{ $labels.datname }}"
|
|
479
|
-
dashboard: "OVH:<MONITORING>/postgres"
|
|
480
|
-
|
|
481
|
-
- alert: PostgresqlHighRateDeadlock
|
|
482
|
-
expr: rate(postgresql_errors_total{type="deadlock_detected"}[1m]) * 60 > 1
|
|
483
|
-
for: 5m
|
|
484
|
-
labels:
|
|
485
|
-
severity: error
|
|
486
|
-
annotations:
|
|
487
|
-
summary: "Postgresql high rate deadlock"
|
|
488
|
-
description: "Postgres detected deadlocks on {{ $labels.release }} - {{ $labels.datname }}"
|
|
489
|
-
dashboard: "OVH:<MONITORING>/postgres"
|
|
490
|
-
|
|
491
|
-
- alert: PostgresqlReplicationLabBytes
|
|
492
|
-
expr: (pg_xlog_position_bytes and pg_replication_is_replica == 0) - on (environment) group_right(instance) (pg_xlog_position_bytes and pg_replication_is_replica == 1) > 1e+09
|
|
493
|
-
for: 5m
|
|
494
|
-
labels:
|
|
495
|
-
severity: error
|
|
496
|
-
annotations:
|
|
497
|
-
summary: "Postgresql replication lab bytes"
|
|
498
|
-
description: "Postgres Replication lag (in bytes) is high on {{ $labels.release }} - {{ $labels.datname }}"
|
|
499
|
-
dashboard: "OVH:<MONITORING>/postgres"
|
|
500
|
-
|
|
501
|
-
- alert: PostgresqlTooManyDeadTuples
|
|
502
|
-
expr: ((pg_stat_user_tables_n_dead_tup > 10000) / (pg_stat_user_tables_n_live_tup + pg_stat_user_tables_n_dead_tup)) >= 0.1 unless ON(instance) (pg_replication_is_replica == 1)
|
|
503
|
-
for: 5m
|
|
504
|
-
labels:
|
|
505
|
-
severity: warning
|
|
506
|
-
annotations:
|
|
507
|
-
summary: "Postgresql too many dead tuples"
|
|
508
|
-
description: "PostgreSQL dead tuples is too large ( {{ $value }} dead tuples) on {{ $labels.release }} - {{ $labels.datname }}"
|
|
509
|
-
dashboard: "OVH:<MONITORING>/postgres"
|
|
510
|
-
|
|
511
|
-
- alert: PostgresqlTooManyLocksAcquired
|
|
512
|
-
expr: ((sum (pg_locks_count)) / (pg_settings_max_locks_per_transaction * pg_settings_max_connections)) > 0.20
|
|
513
|
-
for: 5m
|
|
514
|
-
labels:
|
|
515
|
-
severity: error
|
|
516
|
-
annotations:
|
|
517
|
-
summary: "Postgresql too many locks acquired on {{ $labels.statefulset.kubernetes.io_pod_name }}"
|
|
518
|
-
description: "Too many locks acquired on the database. If this alert happens frequently, we may need to increase the postgres setting max_locks_per_transaction."
|
|
519
|
-
dashboard: "OVH:<MONITORING>/postgres"
|
|
520
|
-
|
|
521
|
-
- name: Redis
|
|
522
|
-
rules:
|
|
523
|
-
- alert: RedisDown
|
|
524
|
-
expr: redis_up == 0
|
|
525
|
-
for: 5m
|
|
526
|
-
labels:
|
|
527
|
-
severity: error
|
|
528
|
-
annotations:
|
|
529
|
-
summary: "Redis down (instance {{ $labels.instance }})"
|
|
530
|
-
description: "Redis instance is down"
|
|
531
|
-
dashboard: "OVH:<MONITORING>/redis"
|
|
532
|
-
|
|
533
|
-
- alert: RedisMissingMaster
|
|
534
|
-
expr: count(redis_instance_info{role="master"}) == 0
|
|
535
|
-
for: 5m
|
|
536
|
-
labels:
|
|
537
|
-
severity: error
|
|
538
|
-
annotations:
|
|
539
|
-
summary: "Redis missing master (instance {{ $labels.instance }})"
|
|
540
|
-
description: "Redis cluster has no node marked as master."
|
|
541
|
-
dashboard: "OVH:<MONITORING>/redis"
|
|
542
|
-
|
|
543
|
-
- alert: RedisTooManyMasters
|
|
544
|
-
expr: count(redis_instance_info{role="master"}) > 1
|
|
545
|
-
for: 5m
|
|
546
|
-
labels:
|
|
547
|
-
severity: error
|
|
548
|
-
annotations:
|
|
549
|
-
summary: "Redis too many masters (instance {{ $labels.instance }})"
|
|
550
|
-
description: "Redis cluster has too many nodes marked as master."
|
|
551
|
-
dashboard: "OVH:<MONITORING>/redis"
|
|
552
|
-
|
|
553
|
-
- alert: RedisDisconnectedSlaves
|
|
554
|
-
expr: count without (instance, job) (redis_connected_slaves) - sum without (instance, job) (redis_connected_slaves) - 1 > 1
|
|
555
|
-
for: 5m
|
|
556
|
-
labels:
|
|
557
|
-
severity: warning
|
|
558
|
-
annotations:
|
|
559
|
-
summary: "Redis disconnected slaves (instance {{ $labels.instance }})"
|
|
560
|
-
description: "Redis not replicating for all slaves. Consider reviewing the redis replication status."
|
|
561
|
-
dashboard: "OVH:<MONITORING>/redis"
|
|
562
|
-
|
|
563
|
-
- alert: RedisReplicationBroken
|
|
564
|
-
expr: delta(redis_connected_slaves[1m]) < 0
|
|
565
|
-
for: 5m
|
|
566
|
-
labels:
|
|
567
|
-
severity: warning
|
|
568
|
-
annotations:
|
|
569
|
-
summary: "Redis replication broken (instance {{ $labels.instance }})"
|
|
570
|
-
description: "Redis instance lost a slave"
|
|
571
|
-
dashboard: "OVH:<MONITORING>/redis"
|
|
572
|
-
|
|
573
|
-
- alert: RedisClusterFlapping
|
|
574
|
-
expr: changes(redis_connected_slaves[5m]) > 2
|
|
575
|
-
for: 5m
|
|
576
|
-
labels:
|
|
577
|
-
severity: error
|
|
578
|
-
annotations:
|
|
579
|
-
summary: "Redis cluster flapping (instance {{ $labels.instance }})"
|
|
580
|
-
description: "Changes have been detected in Redis replica connection. This can occur when replica nodes lose connection to the master and reconnect (a.k.a flapping)."
|
|
581
|
-
dashboard: "OVH:<MONITORING>/redis"
|
|
582
|
-
|
|
583
|
-
- alert: RedisOutOfMemory
|
|
584
|
-
expr: redis_memory_used_bytes / redis_total_system_memory_bytes * 100 > 90
|
|
585
|
-
for: 5m
|
|
586
|
-
labels:
|
|
587
|
-
severity: warning
|
|
588
|
-
annotations:
|
|
589
|
-
summary: "Redis out of memory (instance {{ $labels.instance }})"
|
|
590
|
-
description: "Redis is running out of memory ( {{ $value }}% )"
|
|
591
|
-
dashboard: "OVH:<MONITORING>/redis"
|
|
592
|
-
|
|
593
|
-
- alert: RedisRejectedConnections
|
|
594
|
-
expr: increase(redis_rejected_connections_total[1m]) > 0
|
|
595
|
-
for: 5m
|
|
596
|
-
labels:
|
|
597
|
-
severity: warning
|
|
598
|
-
annotations:
|
|
599
|
-
summary: "Redis rejected connections (instance {{ $labels.instance }})"
|
|
600
|
-
description: "Some connections to Redis has been rejected. Please check {{ $labels.app }}"
|
|
601
|
-
dashboard: "OVH:<MONITORING>/redis"
|
|
602
|
-
|
|
603
|
-
- name: Traefik Alerts
|
|
604
|
-
rules:
|
|
605
|
-
- alert: TraefikConfigReloadFailed
|
|
606
|
-
expr: traefik_config_last_reload_failure > 0
|
|
607
|
-
for: 1m
|
|
608
|
-
labels:
|
|
609
|
-
severity: warning
|
|
610
|
-
annotations:
|
|
611
|
-
summary: "Traefik config failed to reload"
|
|
612
|
-
description: "New config file for Traefik is invalid or Traefik encountered an error"
|
|
613
|
-
|
|
614
|
-
# - alert: TraefikHighHttp4xxError
|
|
615
|
-
# expr: sum(rate(traefik_service_requests_total{code=~"4.*"}[3m])) by (service) / sum(rate(traefik_service_requests_total[3m])) by (service) * 100 > 10
|
|
616
|
-
# for: 5m
|
|
617
|
-
# labels:
|
|
618
|
-
# severity: error
|
|
619
|
-
# annotations:
|
|
620
|
-
# summary: "Traefik high HTTP 4xx error rate on {{ $labels.service }}"
|
|
621
|
-
# description: "Traefik backend 4xx error rate is above 10% (currently at {{ $value }}%)"
|
|
622
|
-
# dashboard: "OVH:<MONITORING>/traefik"
|
|
623
|
-
|
|
624
|
-
- alert: TraefikHighHttp5xxError
|
|
625
|
-
expr: sum(rate(traefik_service_requests_total{code=~"5.*"}[5m])) by (service) / sum(rate(traefik_service_requests_total[5m])) by (service) * 100 > 5
|
|
626
|
-
for: 5m
|
|
627
|
-
labels:
|
|
628
|
-
severity: page
|
|
629
|
-
priority: P3
|
|
630
|
-
annotations:
|
|
631
|
-
summary: "Traefik high HTTP 5xx error rate on {{ $labels.service }}"
|
|
632
|
-
description: "Traefik backend 5xx error rate is above 5% (currently at {{ $value }}%)"
|
|
633
|
-
dashboard: "OVH:<MONITORING>/traefik"
|
|
634
|
-
|
|
635
|
-
- name: Elasticsearch Alerts
|
|
636
|
-
rules:
|
|
637
|
-
- alert: ElasticsearchHeapUsageTooHigh
|
|
638
|
-
expr: (elasticsearch_jvm_memory_used_bytes{area="heap"} / elasticsearch_jvm_memory_max_bytes{area="heap"}) * 100 > 90
|
|
639
|
-
for: 5m
|
|
640
|
-
labels:
|
|
641
|
-
severity: page
|
|
642
|
-
priority: P3
|
|
643
|
-
annotations:
|
|
644
|
-
summary: "Elasticsearch Heap Usage Too High (instance {{ $labels.instance }})"
|
|
645
|
-
description: "The heap usage is over 90% for 5m (currently at {{ $value }}% )"
|
|
646
|
-
dashboard: "OVH:<MONITORING>/elasticsearch"
|
|
647
|
-
|
|
648
|
-
- alert: ElasticsearchHeapUsageWarning
|
|
649
|
-
expr: (elasticsearch_jvm_memory_used_bytes{area="heap"} / elasticsearch_jvm_memory_max_bytes{area="heap"}) * 100 > 80
|
|
650
|
-
for: 5m
|
|
651
|
-
labels:
|
|
652
|
-
severity: warning
|
|
653
|
-
annotations:
|
|
654
|
-
summary: "Elasticsearch Heap Usage warning (instance {{ $labels.instance }})"
|
|
655
|
-
description: "The heap usage is over 80% for 5m (currently at {{ $value }}% )"
|
|
656
|
-
dashboard: "OVH:<MONITORING>/elasticsearch"
|
|
657
|
-
|
|
658
|
-
- alert: ElasticsearchDiskSpaceLow
|
|
659
|
-
expr: elasticsearch_filesystem_data_available_bytes / elasticsearch_filesystem_data_size_bytes * 100 < 20
|
|
660
|
-
for: 5m
|
|
661
|
-
labels:
|
|
662
|
-
severity: warning
|
|
663
|
-
annotations:
|
|
664
|
-
summary: "Elasticsearch disk space low (instance {{ $labels.instance }})"
|
|
665
|
-
description: "The disk usage is over 80% (currently at {{ $value }}% )"
|
|
666
|
-
dashboard: "OVH:<MONITORING>/elasticsearch"
|
|
667
|
-
|
|
668
|
-
- alert: ElasticsearchDiskOutOfSpace
|
|
669
|
-
expr: elasticsearch_filesystem_data_available_bytes / elasticsearch_filesystem_data_size_bytes * 100 < 10
|
|
670
|
-
for: 5m
|
|
671
|
-
labels:
|
|
672
|
-
severity: page
|
|
673
|
-
priority: P3
|
|
674
|
-
annotations:
|
|
675
|
-
summary: "Elasticsearch disk out of space (instance {{ $labels.instance }})"
|
|
676
|
-
description: "The disk usage is over 90% (currently at {{ $value }}% )"
|
|
677
|
-
dashboard: "OVH:<MONITORING>/elasticsearch"
|
|
678
|
-
|
|
679
|
-
- alert: ElasticsearchClusterRed
|
|
680
|
-
expr: elasticsearch_cluster_health_status{color="red"} == 1
|
|
681
|
-
for: 5m
|
|
682
|
-
labels:
|
|
683
|
-
severity: error
|
|
684
|
-
annotations:
|
|
685
|
-
summary: "Elasticsearch Cluster Red (instance {{ $labels.instance }})"
|
|
686
|
-
description: "Elastic Cluster is in an unhealthy state"
|
|
687
|
-
dashboard: "OVH:<MONITORING>/elasticsearch"
|
|
688
|
-
|
|
689
|
-
- alert: ElasticsearchClusterYellow
|
|
690
|
-
expr: elasticsearch_cluster_health_status{color="yellow"} == 1
|
|
691
|
-
for: 5m
|
|
692
|
-
labels:
|
|
693
|
-
severity: warning
|
|
694
|
-
annotations:
|
|
695
|
-
summary: "Elasticsearch Cluster Yellow (instance {{ $labels.instance }})"
|
|
696
|
-
description: "Elastic Cluster is in an unhealthy state"
|
|
697
|
-
dashboard: "OVH:<MONITORING>/elasticsearch"
|
|
698
|
-
|
|
699
|
-
- alert: ElasticsearchRelocationShards
|
|
700
|
-
expr: elasticsearch_cluster_health_relocating_shards > 0
|
|
701
|
-
for: 5m
|
|
702
|
-
labels:
|
|
703
|
-
severity: error
|
|
704
|
-
annotations:
|
|
705
|
-
summary: "Elasticsearch relocation shards (instance {{ $labels.instance }})"
|
|
706
|
-
description: "Number of relocation shards for 20 min is {{ $value }}"
|
|
707
|
-
dashboard: "OVH:<MONITORING>/elasticsearch"
|
|
708
|
-
|
|
709
|
-
- alert: ElasticsearchInitializingShards
|
|
710
|
-
expr: elasticsearch_cluster_health_initializing_shards > 0
|
|
711
|
-
for: 5m
|
|
712
|
-
labels:
|
|
713
|
-
severity: warning
|
|
714
|
-
annotations:
|
|
715
|
-
summary: "Elasticsearch initializing shards (instance {{ $labels.instance }})"
|
|
716
|
-
description: "Number of initializing shards for 10 min is {{ $value }}"
|
|
717
|
-
dashboard: "OVH:<MONITORING>/elasticsearch"
|
|
718
|
-
|
|
719
|
-
- alert: ElasticsearchUnassignedShards
|
|
720
|
-
expr: elasticsearch_cluster_health_unassigned_shards > 0
|
|
721
|
-
for: 5m
|
|
722
|
-
labels:
|
|
723
|
-
severity: error
|
|
724
|
-
annotations:
|
|
725
|
-
summary: "Elasticsearch unassigned shards (instance {{ $labels.instance }})"
|
|
726
|
-
description: "Number of unassigned shards for 2 min is {{ $value }}"
|
|
727
|
-
dashboard: "OVH:<MONITORING>/elasticsearch"
|
|
728
|
-
|
|
729
|
-
- alert: ElasticsearchPendingTasks
|
|
730
|
-
expr: elasticsearch_cluster_health_number_of_pending_tasks > 0
|
|
731
|
-
for: 5m
|
|
732
|
-
labels:
|
|
733
|
-
severity: warning
|
|
734
|
-
annotations:
|
|
735
|
-
summary: "Elasticsearch pending tasks (instance {{ $labels.instance }})"
|
|
736
|
-
description: "Number of pending tasks for 10 min is {{ $value }}. Cluster is working slowly."
|
|
737
|
-
dashboard: "OVH:<MONITORING>/elasticsearch"
|
|
738
|
-
- name: Velero Alerts
|
|
739
|
-
rules:
|
|
740
|
-
- alert: VeleroBackupFailure
|
|
741
|
-
expr: (time() - velero_backup_last_successful_timestamp{schedule_version=~"2.[0]"} > 108000) and (velero_backup_success_total{schedule!=""} != 0)
|
|
742
|
-
for: 5m
|
|
743
|
-
labels:
|
|
744
|
-
severity: warning
|
|
745
|
-
annotations:
|
|
746
|
-
summary: "Velero schedule {{ $labels.schedule }} backup failed to execute properly"
|
|
747
|
-
description: "It has been over 30 hours since the last successful backup"
|
|
748
|
-
dashboard: "OVH:<MONITORING>/velero"
|
|
749
|
-
- alert: NoVeleroBackups
|
|
750
|
-
expr: velero_backup_success_total{schedule!=""} == 0
|
|
751
|
-
for: 30h
|
|
752
|
-
labels:
|
|
753
|
-
severity: warning
|
|
754
|
-
annotations:
|
|
755
|
-
summary: "Velero has not made any backups yet"
|
|
756
|
-
description: "No backups have successfully been made since velero was initialized (or restarted), go check it out ASAP"
|
|
757
|
-
dashboard: "OVH:<MONITORING>/velero"
|
|
758
|
-
#
|
|
759
|
-
# Add local custom rules / alerts here
|
|
760
|
-
#
|
|
761
|
-
# - name: Custom Local Alerts
|
|
762
|
-
# rules:
|
|
763
|
-
# - alert: MyCustomAlertName
|
|
764
|
-
# expr: my_prom_ql_expression
|