@leverege/build-tools 2.54.1 → 2.55.0
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 +4 -4
- package/registry-compass.yaml +20 -0
- package/src/chart-compass.mjs +96 -0
- package/src/helm-charts/elasticsearch8/helmup.plugin +2 -21
- package/src/helm-charts/prom-operator/.nohelm +0 -0
- package/src/helm-charts/prom-operator/.nohelmdn +0 -0
- package/src/helm-charts/prom-operator/apply-rules +13 -0
- package/src/helm-charts/prom-operator/elasticsearch-exporter.yaml +20 -0
- package/src/helm-charts/prom-operator/gitignore +2 -0
- package/src/helm-charts/prom-operator/helmdn.plugin +17 -0
- package/src/helm-charts/prom-operator/helmup.plugin +27 -0
- package/src/helm-charts/prom-operator/prometheus-stack.yaml.ovh +139 -0
- package/src/helm-charts/prom-operator/rules/elasticsearch-rules.yaml +111 -0
- package/src/helm-charts/prom-operator/rules/gcp-rules.yaml +47 -0
- package/src/helm-charts/prom-operator/rules/kubernetes-rules.yaml +112 -0
- package/src/helm-charts/prom-operator/rules/kubernetes-rules.yaml.off +112 -0
- package/src/helm-charts/prom-operator/rules/leverege-rules.yaml +20 -0
- package/src/helm-charts/prom-operator/rules/postgres-rules.yaml +190 -0
- package/src/helm-charts/prom-operator/rules/prometheus-rules.yaml +79 -0
- package/src/helm-charts/prom-operator/rules/prometheus-rules.yaml.off +79 -0
- package/src/helm-charts/prom-operator/rules/redis-rules.yaml +90 -0
- package/src/helm-charts/prom-operator/rules/traefik-rules.yaml +28 -0
- package/src/helm-charts/prom-operator/rules/velero-rules.yaml +28 -0
- package/src/helm-charts/prom-operator/stackdriver-exporter.yaml.ovh +52 -0
- package/src/helm-charts/redis/redis-local.yaml +3 -0
- package/src/helmup.sh +11 -4
- package/src/overwhelm.mjs +8 -1
|
@@ -0,0 +1,112 @@
|
|
|
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
|
+
dashboard: "OVH:<MONITORING>/k8s-pvc/pvc-usage?var-volume={{ $labels.persistentvolumeclaim }}"
|
|
62
|
+
|
|
63
|
+
# - alert: KubernetesVolumeFullInFourDays
|
|
64
|
+
# expr: predict_linear(kubelet_volume_stats_available_bytes[6h], 4 * 24 * 3600) < 0
|
|
65
|
+
# for: 5m
|
|
66
|
+
# labels:
|
|
67
|
+
# severity: error
|
|
68
|
+
# annotations:
|
|
69
|
+
# summary: "Kubernetes Volume full in four days "
|
|
70
|
+
# description: "{{ $labels.namespace }}/{{ $labels.persistentvolumeclaim }} is expected to fill up within four days. Currently {{ $value | humanize }}% is available."
|
|
71
|
+
# dashboard: "OVH:<MONITORING>/pvc"
|
|
72
|
+
|
|
73
|
+
- alert: KubernetesPersistentvolumeError
|
|
74
|
+
expr: kube_persistentvolume_status_phase{phase=~"Failed|Pending",job="kube-state-metrics"} > 0
|
|
75
|
+
for: 5m
|
|
76
|
+
labels:
|
|
77
|
+
severity: error
|
|
78
|
+
annotations:
|
|
79
|
+
summary: "Kubernetes PersistentVolume error "
|
|
80
|
+
description: "PersistentVolumeClaim {{ $labels.namespace }}/{{ $labels.persistentvolumeclaim }} is stuck pending"
|
|
81
|
+
dashboard: "Check GKE or EKS PVC/storage status"
|
|
82
|
+
|
|
83
|
+
- alert: KubernetesHpaScaleCapability
|
|
84
|
+
expr: kube_hpa_status_desired_replicas >= kube_hpa_spec_max_replicas
|
|
85
|
+
for: 15m
|
|
86
|
+
labels:
|
|
87
|
+
severity: warning
|
|
88
|
+
annotations:
|
|
89
|
+
summary: "Kubernetes HPA scale capability"
|
|
90
|
+
description: "Kubernetes has scaled {{ $labels.hpa }} to max number of scaled pods."
|
|
91
|
+
dashboard: "OVH:<MONITORING>/k8-deployment"
|
|
92
|
+
|
|
93
|
+
- alert: KubernetesPodNotHealthy
|
|
94
|
+
expr: kube_pod_status_phase{phase=~"Pending|Unknown|Failed"} == 1
|
|
95
|
+
for: 20m
|
|
96
|
+
labels:
|
|
97
|
+
severity: error
|
|
98
|
+
annotations:
|
|
99
|
+
summary: "Kubernetes Pod not healthy"
|
|
100
|
+
description: "Pod {{ $labels.pod }} has been in a non-ready state for longer than 20 minutes."
|
|
101
|
+
dashboard: "Check the pod status using the Kubernetes UI"
|
|
102
|
+
|
|
103
|
+
- alert: KubernetesPodCrashLooping
|
|
104
|
+
expr: rate(kube_pod_container_status_restarts_total[15m]) * 60 * 5 > 5
|
|
105
|
+
for: 5m
|
|
106
|
+
labels:
|
|
107
|
+
severity: page
|
|
108
|
+
priority: P2
|
|
109
|
+
annotations:
|
|
110
|
+
summary: "Kubernetes pod crash looping"
|
|
111
|
+
description: "{{ $labels.pod }} is in a crash loop"
|
|
112
|
+
dashboard: "Check the pod status using the Kubernetes UI"
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
apiVersion: monitoring.coreos.com/v1
|
|
2
|
+
kind: PrometheusRule
|
|
3
|
+
metadata:
|
|
4
|
+
name: leverege-rules
|
|
5
|
+
namespace: prometheus
|
|
6
|
+
|
|
7
|
+
spec:
|
|
8
|
+
groups:
|
|
9
|
+
- name: Leverege
|
|
10
|
+
rules:
|
|
11
|
+
- alert: frequent_app_restarts
|
|
12
|
+
expr: rate(nodejs_app_exit_count[15m]) * 60 * 5 > 5
|
|
13
|
+
for: 1m
|
|
14
|
+
labels:
|
|
15
|
+
severity: page
|
|
16
|
+
priority: P2
|
|
17
|
+
annotations:
|
|
18
|
+
summary: Apps are restarting frequently
|
|
19
|
+
description: "{{ $labels.app }} is in a crash loop"
|
|
20
|
+
dashboard: "OVH:<MONITORING>/stackdriver"
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
apiVersion: monitoring.coreos.com/v1
|
|
2
|
+
kind: PrometheusRule
|
|
3
|
+
metadata:
|
|
4
|
+
name: postgres-rules
|
|
5
|
+
namespace: prometheus
|
|
6
|
+
|
|
7
|
+
spec:
|
|
8
|
+
groups:
|
|
9
|
+
- name: Postgres
|
|
10
|
+
rules:
|
|
11
|
+
- alert: PostgresqlDown
|
|
12
|
+
expr: pg_up == 0
|
|
13
|
+
for: 5m
|
|
14
|
+
labels:
|
|
15
|
+
severity: page
|
|
16
|
+
priority: P3
|
|
17
|
+
annotations:
|
|
18
|
+
summary: "Postgresql down"
|
|
19
|
+
description: "Postgresql instance is down: check {{ $labels.release }}"
|
|
20
|
+
dashboard: "OVH:<MONITORING>/postgres"
|
|
21
|
+
|
|
22
|
+
- alert: PostgresqlRestarted
|
|
23
|
+
expr: time() - pg_postmaster_start_time_seconds < 60
|
|
24
|
+
for: 5m
|
|
25
|
+
labels:
|
|
26
|
+
severity: error
|
|
27
|
+
annotations:
|
|
28
|
+
summary: "Postgresql restarted"
|
|
29
|
+
description: "Postgresql restarted: check {{ $labels.release }}"
|
|
30
|
+
dashboard: "OVH:<MONITORING>/postgres"
|
|
31
|
+
|
|
32
|
+
- alert: PostgresqlExporterError
|
|
33
|
+
expr: pg_exporter_last_scrape_error > 0
|
|
34
|
+
for: 5m
|
|
35
|
+
labels:
|
|
36
|
+
severity: warning
|
|
37
|
+
annotations:
|
|
38
|
+
summary: "Postgresql exporter error for {{ $labels.release }}"
|
|
39
|
+
description: "Postgresql exporter is showing errors. Metrics may be outdated"
|
|
40
|
+
dashboard: "OVH:<MONITORING>/postgres"
|
|
41
|
+
|
|
42
|
+
- alert: PostgresqlReplicationLag
|
|
43
|
+
expr: (pg_replication_lag > 10) and ON(instance) (pg_replication_is_replica == 1)
|
|
44
|
+
for: 5m
|
|
45
|
+
labels:
|
|
46
|
+
severity: warning
|
|
47
|
+
annotations:
|
|
48
|
+
summary: "Postgresql replication lag"
|
|
49
|
+
description: "PostgreSQL replication lag is going up (> 10s): check {{ $labels.release }}"
|
|
50
|
+
dashboard: "OVH:<MONITORING>/postgres"
|
|
51
|
+
|
|
52
|
+
- alert: PostgresqlTableNotVacuumed
|
|
53
|
+
expr: (pg_stat_user_tables_last_autovacuum > 0) and (time() - pg_stat_user_tables_last_autovacuum > 60 * 60 * 24)
|
|
54
|
+
for: 5m
|
|
55
|
+
labels:
|
|
56
|
+
severity: warning
|
|
57
|
+
annotations:
|
|
58
|
+
summary: "Postgresql table not vacuumed"
|
|
59
|
+
description: "Table has not been vacuum for 24 hours: check {{ $labels.instance }}"
|
|
60
|
+
dashboard: "OVH:<MONITORING>/postgres"
|
|
61
|
+
|
|
62
|
+
- alert: PostgresqlTableNotAutoAnalyzed
|
|
63
|
+
expr: (pg_stat_user_tables_last_autoanalyze > 0) and (time() - pg_stat_user_tables_last_autoanalyze > 60 * 60 * 24)
|
|
64
|
+
for: 5m
|
|
65
|
+
labels:
|
|
66
|
+
severity: warning
|
|
67
|
+
annotations:
|
|
68
|
+
summary: "Postgresql table not analyzed (instance {{ $labels.instance }})"
|
|
69
|
+
description: "Table {{ $labels.relname }} has not been analyzed for 24 hours: check {{ $labels.release }} - {{ $labels.datname }}"
|
|
70
|
+
dashboard: "OVH:<MONITORING>/postgres"
|
|
71
|
+
|
|
72
|
+
- alert: PostgresqlDeadLocks
|
|
73
|
+
expr: rate(pg_stat_database_deadlocks{datname!~"template.*|postgres"}[1m]) > 0
|
|
74
|
+
for: 5m
|
|
75
|
+
labels:
|
|
76
|
+
severity: warning
|
|
77
|
+
annotations:
|
|
78
|
+
summary: "Postgresql dead locks"
|
|
79
|
+
description: "PostgreSQL has dead-locks: check {{ $labels.release }} - {{ $labels.datname }}"
|
|
80
|
+
dashboard: "OVH:<MONITORING>/postgres"
|
|
81
|
+
|
|
82
|
+
- alert: PostgresqlSlowQueries
|
|
83
|
+
expr: pg_slow_queries > 0
|
|
84
|
+
for: 5m
|
|
85
|
+
labels:
|
|
86
|
+
severity: warning
|
|
87
|
+
annotations:
|
|
88
|
+
summary: "Postgresql slow queries"
|
|
89
|
+
description: "PostgreSQL executing slow queries"
|
|
90
|
+
dashboard: "OVH:<MONITORING>/postgres"
|
|
91
|
+
|
|
92
|
+
- alert: PostgresqlHighRollbackRate
|
|
93
|
+
expr: rate(pg_stat_database_xact_rollback{datname!~"template.*"}[3m]) / rate(pg_stat_database_xact_commit{datname!~"template.*"}[3m]) > 0.02
|
|
94
|
+
for: 5m
|
|
95
|
+
labels:
|
|
96
|
+
severity: warning
|
|
97
|
+
annotations:
|
|
98
|
+
summary: "Postgresql high rollback rate on {{ $labels.release }} - {{ $labels.datname }}"
|
|
99
|
+
description: "Ratio of transactions being aborted compared to committed is > 2 %"
|
|
100
|
+
dashboard: "OVH:<MONITORING>/postgres"
|
|
101
|
+
|
|
102
|
+
- alert: PostgresqlCommitRateLow
|
|
103
|
+
expr: rate(pg_stat_database_xact_commit[1m]) < 10
|
|
104
|
+
for: 5m
|
|
105
|
+
labels:
|
|
106
|
+
severity: error
|
|
107
|
+
annotations:
|
|
108
|
+
summary: "Postgresql commit rate low on {{ $labels.release }} - {{ $labels.datname }}"
|
|
109
|
+
description: "Postgres seems to be processing very few transactions"
|
|
110
|
+
dashboard: "OVH:<MONITORING>/postgres"
|
|
111
|
+
|
|
112
|
+
- alert: PostgresqlLowXidConsumption
|
|
113
|
+
expr: rate(pg_txid_current[1m]) < 5
|
|
114
|
+
for: 5m
|
|
115
|
+
labels:
|
|
116
|
+
severity: warning
|
|
117
|
+
annotations:
|
|
118
|
+
summary: "Postgresql low XID consumption on {{ $labels.release }} - {{ $labels.datname }}"
|
|
119
|
+
description: "Postgresql seems to be consuming transaction IDs very slowly"
|
|
120
|
+
dashboard: "OVH:<MONITORING>/postgres"
|
|
121
|
+
|
|
122
|
+
- alert: PostgresqllowXlogConsumption
|
|
123
|
+
expr: rate(pg_xlog_position_bytes[1m]) < 100
|
|
124
|
+
for: 5m
|
|
125
|
+
labels:
|
|
126
|
+
severity: warning
|
|
127
|
+
annotations:
|
|
128
|
+
summary: "Postgresqllow XLOG consumption on {{ $labels.release }} - {{ $labels.datname }}"
|
|
129
|
+
description: "Postgres seems to be consuming XLOG very slowly"
|
|
130
|
+
dashboard: "OVH:<MONITORING>/postgres"
|
|
131
|
+
|
|
132
|
+
- alert: PostgresqlWaleReplicationStopped
|
|
133
|
+
expr: rate(pg_xlog_position_bytes[1m]) == 0
|
|
134
|
+
for: 5m
|
|
135
|
+
labels:
|
|
136
|
+
severity: error
|
|
137
|
+
annotations:
|
|
138
|
+
summary: "Postgresql WAL-E replication stopped on {{ $labels.release }} - {{ $labels.datname }}"
|
|
139
|
+
description: "WAL-E replication seems to be stopped"
|
|
140
|
+
dashboard: "OVH:<MONITORING>/postgres"
|
|
141
|
+
|
|
142
|
+
- alert: PostgresqlHighRateStatementTimeout
|
|
143
|
+
expr: rate(postgresql_errors_total{type="statement_timeout"}[5m]) > 3
|
|
144
|
+
for: 5m
|
|
145
|
+
labels:
|
|
146
|
+
severity: error
|
|
147
|
+
annotations:
|
|
148
|
+
summary: "Postgresql high rate statement timeout"
|
|
149
|
+
description: "Postgres transactions showing high rate of statement timeouts on {{ $labels.release }} - {{ $labels.datname }}"
|
|
150
|
+
dashboard: "OVH:<MONITORING>/postgres"
|
|
151
|
+
|
|
152
|
+
- alert: PostgresqlHighRateDeadlock
|
|
153
|
+
expr: rate(postgresql_errors_total{type="deadlock_detected"}[1m]) * 60 > 1
|
|
154
|
+
for: 5m
|
|
155
|
+
labels:
|
|
156
|
+
severity: error
|
|
157
|
+
annotations:
|
|
158
|
+
summary: "Postgresql high rate deadlock"
|
|
159
|
+
description: "Postgres detected deadlocks on {{ $labels.release }} - {{ $labels.datname }}"
|
|
160
|
+
dashboard: "OVH:<MONITORING>/postgres"
|
|
161
|
+
|
|
162
|
+
- alert: PostgresqlReplicationLabBytes
|
|
163
|
+
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
|
|
164
|
+
for: 5m
|
|
165
|
+
labels:
|
|
166
|
+
severity: error
|
|
167
|
+
annotations:
|
|
168
|
+
summary: "Postgresql replication lab bytes"
|
|
169
|
+
description: "Postgres Replication lag (in bytes) is high on {{ $labels.release }} - {{ $labels.datname }}"
|
|
170
|
+
dashboard: "OVH:<MONITORING>/postgres"
|
|
171
|
+
|
|
172
|
+
- alert: PostgresqlTooManyDeadTuples
|
|
173
|
+
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)
|
|
174
|
+
for: 5m
|
|
175
|
+
labels:
|
|
176
|
+
severity: warning
|
|
177
|
+
annotations:
|
|
178
|
+
summary: "Postgresql too many dead tuples"
|
|
179
|
+
description: "PostgreSQL dead tuples is too large ( {{ $value }} dead tuples) on {{ $labels.release }} - {{ $labels.datname }}"
|
|
180
|
+
dashboard: "OVH:<MONITORING>/postgres"
|
|
181
|
+
|
|
182
|
+
- alert: PostgresqlTooManyLocksAcquired
|
|
183
|
+
expr: ((sum (pg_locks_count)) / (pg_settings_max_locks_per_transaction * pg_settings_max_connections)) > 0.20
|
|
184
|
+
for: 5m
|
|
185
|
+
labels:
|
|
186
|
+
severity: error
|
|
187
|
+
annotations:
|
|
188
|
+
summary: "Postgresql too many locks acquired on {{ $labels.statefulset.kubernetes.io_pod_name }}"
|
|
189
|
+
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."
|
|
190
|
+
dashboard: "OVH:<MONITORING>/postgres"
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
apiVersion: monitoring.coreos.com/v1
|
|
2
|
+
kind: PrometheusRule
|
|
3
|
+
metadata:
|
|
4
|
+
name: prometheus-rules
|
|
5
|
+
namespace: prometheus
|
|
6
|
+
|
|
7
|
+
spec:
|
|
8
|
+
groups:
|
|
9
|
+
- name: Prometheus
|
|
10
|
+
rules:
|
|
11
|
+
- alert: targets_down
|
|
12
|
+
expr: up{target_env!="preemptibles"} == 0
|
|
13
|
+
for: 10m
|
|
14
|
+
labels:
|
|
15
|
+
severity: warning
|
|
16
|
+
annotations:
|
|
17
|
+
summary: Prometheus target missing
|
|
18
|
+
description: "Prometheus failed to scrape {{ $labels.app }}"
|
|
19
|
+
dashboard: "See prometheus.md in SRE Playbook"
|
|
20
|
+
|
|
21
|
+
- alert: PrometheusConfigurationReloadFailure
|
|
22
|
+
expr: prometheus_config_last_reload_successful != 1
|
|
23
|
+
for: 5m
|
|
24
|
+
labels:
|
|
25
|
+
severity: warning
|
|
26
|
+
annotations:
|
|
27
|
+
summary: "Prometheus server configuration reload failure"
|
|
28
|
+
description: "Prometheus server failed to reload server configs (e.g. alerts, rules)"
|
|
29
|
+
dashboard: "See prometheus.md in SRE Playbook"
|
|
30
|
+
|
|
31
|
+
- alert: PrometheusAlertmanagerConfigurationReloadFailure
|
|
32
|
+
expr: alertmanager_config_last_reload_successful != 1
|
|
33
|
+
for: 5m
|
|
34
|
+
labels:
|
|
35
|
+
severity: warning
|
|
36
|
+
annotations:
|
|
37
|
+
summary: "Prometheus AlertManager configuration reload failure"
|
|
38
|
+
description: "AlertManager failed to reload alert configs (e.g. slack, opsgenie)"
|
|
39
|
+
dashboard: "See prometheus.md in SRE Playbook"
|
|
40
|
+
|
|
41
|
+
- alert: PrometheusTooManyRestarts
|
|
42
|
+
expr: changes(process_start_time_seconds{job=~"prometheus|alertmanager"}[15m]) > 2
|
|
43
|
+
for: 5m
|
|
44
|
+
labels:
|
|
45
|
+
severity: warning
|
|
46
|
+
annotations:
|
|
47
|
+
summary: "Prometheus is in a crash loop"
|
|
48
|
+
description: "Prometheus {{ $labels.component }} has restarted more than twice in the last 15 minutes. It might be crashlooping."
|
|
49
|
+
dashboard: "See prometheus.md in SRE Playbook"
|
|
50
|
+
|
|
51
|
+
- alert: PrometheusNotConnectedToAlertmanager
|
|
52
|
+
expr: prometheus_notifications_alertmanagers_discovered < 1
|
|
53
|
+
for: 5m
|
|
54
|
+
labels:
|
|
55
|
+
severity: error
|
|
56
|
+
annotations:
|
|
57
|
+
summary: "Prometheus not connected to alertmanager"
|
|
58
|
+
description: "Prometheus cannot connect the alertmanager - new alerts may not be detected"
|
|
59
|
+
dashboard: "See prometheus.md in SRE Playbook"
|
|
60
|
+
|
|
61
|
+
- alert: PrometheusNotificationsBacklog
|
|
62
|
+
expr: min_over_time(prometheus_notifications_queue_length[10m]) > 0
|
|
63
|
+
for: 5m
|
|
64
|
+
labels:
|
|
65
|
+
severity: warning
|
|
66
|
+
annotations:
|
|
67
|
+
summary: "Prometheus notifications backlog"
|
|
68
|
+
description: "The Prometheus notification queue has not been empty for 10 minutes"
|
|
69
|
+
dashboard: "See prometheus.md in SRE Playbook"
|
|
70
|
+
|
|
71
|
+
- alert: PrometheusAlertmanagerNotificationFailing
|
|
72
|
+
expr: rate(alertmanager_notifications_failed_total[1m]) > 0
|
|
73
|
+
for: 5m
|
|
74
|
+
labels:
|
|
75
|
+
severity: error
|
|
76
|
+
annotations:
|
|
77
|
+
summary: "Prometheus AlertManager notification failing"
|
|
78
|
+
description: "Alertmanager is failing to send notifications"
|
|
79
|
+
dashboard: "See prometheus.md in SRE Playbook"
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
apiVersion: monitoring.coreos.com/v1
|
|
2
|
+
kind: PrometheusRule
|
|
3
|
+
metadata:
|
|
4
|
+
name: prometheus-rules
|
|
5
|
+
namespace: prometheus
|
|
6
|
+
|
|
7
|
+
spec:
|
|
8
|
+
groups:
|
|
9
|
+
- name: Prometheus
|
|
10
|
+
rules:
|
|
11
|
+
- alert: targets_down
|
|
12
|
+
expr: up{target_env!="preemptibles"} == 0
|
|
13
|
+
for: 10m
|
|
14
|
+
labels:
|
|
15
|
+
severity: warning
|
|
16
|
+
annotations:
|
|
17
|
+
summary: Prometheus target missing
|
|
18
|
+
description: "Prometheus failed to scrape {{ $labels.app }}"
|
|
19
|
+
dashboard: "See prometheus.md in SRE Playbook"
|
|
20
|
+
|
|
21
|
+
- alert: PrometheusConfigurationReloadFailure
|
|
22
|
+
expr: prometheus_config_last_reload_successful != 1
|
|
23
|
+
for: 5m
|
|
24
|
+
labels:
|
|
25
|
+
severity: warning
|
|
26
|
+
annotations:
|
|
27
|
+
summary: "Prometheus server configuration reload failure"
|
|
28
|
+
description: "Prometheus server failed to reload server configs (e.g. alerts, rules)"
|
|
29
|
+
dashboard: "See prometheus.md in SRE Playbook"
|
|
30
|
+
|
|
31
|
+
- alert: PrometheusAlertmanagerConfigurationReloadFailure
|
|
32
|
+
expr: alertmanager_config_last_reload_successful != 1
|
|
33
|
+
for: 5m
|
|
34
|
+
labels:
|
|
35
|
+
severity: warning
|
|
36
|
+
annotations:
|
|
37
|
+
summary: "Prometheus AlertManager configuration reload failure"
|
|
38
|
+
description: "AlertManager failed to reload alert configs (e.g. slack, opsgenie)"
|
|
39
|
+
dashboard: "See prometheus.md in SRE Playbook"
|
|
40
|
+
|
|
41
|
+
- alert: PrometheusTooManyRestarts
|
|
42
|
+
expr: changes(process_start_time_seconds{job=~"prometheus|alertmanager"}[15m]) > 2
|
|
43
|
+
for: 5m
|
|
44
|
+
labels:
|
|
45
|
+
severity: warning
|
|
46
|
+
annotations:
|
|
47
|
+
summary: "Prometheus is in a crash loop"
|
|
48
|
+
description: "Prometheus {{ $labels.component }} has restarted more than twice in the last 15 minutes. It might be crashlooping."
|
|
49
|
+
dashboard: "See prometheus.md in SRE Playbook"
|
|
50
|
+
|
|
51
|
+
- alert: PrometheusNotConnectedToAlertmanager
|
|
52
|
+
expr: prometheus_notifications_alertmanagers_discovered < 1
|
|
53
|
+
for: 5m
|
|
54
|
+
labels:
|
|
55
|
+
severity: error
|
|
56
|
+
annotations:
|
|
57
|
+
summary: "Prometheus not connected to alertmanager"
|
|
58
|
+
description: "Prometheus cannot connect the alertmanager - new alerts may not be detected"
|
|
59
|
+
dashboard: "See prometheus.md in SRE Playbook"
|
|
60
|
+
|
|
61
|
+
- alert: PrometheusNotificationsBacklog
|
|
62
|
+
expr: min_over_time(prometheus_notifications_queue_length[10m]) > 0
|
|
63
|
+
for: 5m
|
|
64
|
+
labels:
|
|
65
|
+
severity: warning
|
|
66
|
+
annotations:
|
|
67
|
+
summary: "Prometheus notifications backlog"
|
|
68
|
+
description: "The Prometheus notification queue has not been empty for 10 minutes"
|
|
69
|
+
dashboard: "See prometheus.md in SRE Playbook"
|
|
70
|
+
|
|
71
|
+
- alert: PrometheusAlertmanagerNotificationFailing
|
|
72
|
+
expr: rate(alertmanager_notifications_failed_total[1m]) > 0
|
|
73
|
+
for: 5m
|
|
74
|
+
labels:
|
|
75
|
+
severity: error
|
|
76
|
+
annotations:
|
|
77
|
+
summary: "Prometheus AlertManager notification failing"
|
|
78
|
+
description: "Alertmanager is failing to send notifications"
|
|
79
|
+
dashboard: "See prometheus.md in SRE Playbook"
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
apiVersion: monitoring.coreos.com/v1
|
|
2
|
+
kind: PrometheusRule
|
|
3
|
+
metadata:
|
|
4
|
+
name: redis-rules
|
|
5
|
+
namespace: prometheus
|
|
6
|
+
|
|
7
|
+
spec:
|
|
8
|
+
groups:
|
|
9
|
+
- name: Redis
|
|
10
|
+
rules:
|
|
11
|
+
- alert: RedisDown
|
|
12
|
+
expr: redis_up == 0
|
|
13
|
+
for: 5m
|
|
14
|
+
labels:
|
|
15
|
+
severity: error
|
|
16
|
+
annotations:
|
|
17
|
+
summary: "Redis down (instance {{ $labels.instance }})"
|
|
18
|
+
description: "Redis instance is down"
|
|
19
|
+
dashboard: "OVH:<MONITORING>/redis"
|
|
20
|
+
|
|
21
|
+
- alert: RedisMissingMaster
|
|
22
|
+
expr: count(redis_instance_info{role="master"}) == 0
|
|
23
|
+
for: 5m
|
|
24
|
+
labels:
|
|
25
|
+
severity: error
|
|
26
|
+
annotations:
|
|
27
|
+
summary: "Redis missing master (instance {{ $labels.instance }})"
|
|
28
|
+
description: "Redis cluster has no node marked as master."
|
|
29
|
+
dashboard: "OVH:<MONITORING>/redis"
|
|
30
|
+
|
|
31
|
+
- alert: RedisTooManyMasters
|
|
32
|
+
expr: count(redis_instance_info{role="master"}) > 1
|
|
33
|
+
for: 5m
|
|
34
|
+
labels:
|
|
35
|
+
severity: error
|
|
36
|
+
annotations:
|
|
37
|
+
summary: "Redis too many masters (instance {{ $labels.instance }})"
|
|
38
|
+
description: "Redis cluster has too many nodes marked as master."
|
|
39
|
+
dashboard: "OVH:<MONITORING>/redis"
|
|
40
|
+
|
|
41
|
+
- alert: RedisDisconnectedSlaves
|
|
42
|
+
expr: count without (instance, job) (redis_connected_slaves) - sum without (instance, job) (redis_connected_slaves) - 1 > 1
|
|
43
|
+
for: 5m
|
|
44
|
+
labels:
|
|
45
|
+
severity: warning
|
|
46
|
+
annotations:
|
|
47
|
+
summary: "Redis disconnected slaves (instance {{ $labels.instance }})"
|
|
48
|
+
description: "Redis not replicating for all slaves. Consider reviewing the redis replication status."
|
|
49
|
+
dashboard: "OVH:<MONITORING>/redis"
|
|
50
|
+
|
|
51
|
+
- alert: RedisReplicationBroken
|
|
52
|
+
expr: delta(redis_connected_slaves[1m]) < 0
|
|
53
|
+
for: 5m
|
|
54
|
+
labels:
|
|
55
|
+
severity: warning
|
|
56
|
+
annotations:
|
|
57
|
+
summary: "Redis replication broken (instance {{ $labels.instance }})"
|
|
58
|
+
description: "Redis instance lost a slave"
|
|
59
|
+
dashboard: "OVH:<MONITORING>/redis"
|
|
60
|
+
|
|
61
|
+
- alert: RedisClusterFlapping
|
|
62
|
+
expr: changes(redis_connected_slaves[5m]) > 2
|
|
63
|
+
for: 5m
|
|
64
|
+
labels:
|
|
65
|
+
severity: error
|
|
66
|
+
annotations:
|
|
67
|
+
summary: "Redis cluster flapping (instance {{ $labels.instance }})"
|
|
68
|
+
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)."
|
|
69
|
+
dashboard: "OVH:<MONITORING>/redis"
|
|
70
|
+
|
|
71
|
+
- alert: RedisOutOfMemory
|
|
72
|
+
expr: redis_memory_used_bytes / redis_total_system_memory_bytes * 100 > 90
|
|
73
|
+
for: 5m
|
|
74
|
+
labels:
|
|
75
|
+
severity: warning
|
|
76
|
+
annotations:
|
|
77
|
+
summary: "Redis out of memory (instance {{ $labels.instance }})"
|
|
78
|
+
description: "Redis is running out of memory ( {{ $value }}% )"
|
|
79
|
+
dashboard: "OVH:<MONITORING>/redis"
|
|
80
|
+
|
|
81
|
+
- alert: RedisRejectedConnections
|
|
82
|
+
expr: increase(redis_rejected_connections_total[1m]) > 0
|
|
83
|
+
for: 5m
|
|
84
|
+
labels:
|
|
85
|
+
severity: warning
|
|
86
|
+
annotations:
|
|
87
|
+
summary: "Redis rejected connections (instance {{ $labels.instance }})"
|
|
88
|
+
description: "Some connections to Redis has been rejected. Please check {{ $labels.app }}"
|
|
89
|
+
dashboard: "OVH:<MONITORING>/redis"
|
|
90
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
apiVersion: monitoring.coreos.com/v1
|
|
2
|
+
kind: PrometheusRule
|
|
3
|
+
metadata:
|
|
4
|
+
name: traefik-rules
|
|
5
|
+
namespace: prometheus
|
|
6
|
+
|
|
7
|
+
spec:
|
|
8
|
+
groups:
|
|
9
|
+
- name: Traefik Alerts
|
|
10
|
+
rules:
|
|
11
|
+
- alert: TraefikConfigReloadFailed
|
|
12
|
+
expr: traefik_config_last_reload_failure > 0
|
|
13
|
+
for: 1m
|
|
14
|
+
labels:
|
|
15
|
+
severity: warning
|
|
16
|
+
annotations:
|
|
17
|
+
summary: "Traefik config failed to reload"
|
|
18
|
+
description: "New config file for Traefik is invalid or Traefik encountered an error"
|
|
19
|
+
|
|
20
|
+
# - alert: TraefikHighHttp4xxError
|
|
21
|
+
# expr: sum(rate(traefik_service_requests_total{code=~"4.*"}[3m])) by (service) / sum(rate(traefik_service_requests_total[3m])) by (service) * 100 > 10
|
|
22
|
+
# for: 5m
|
|
23
|
+
# labels:
|
|
24
|
+
# severity: error
|
|
25
|
+
# annotations:
|
|
26
|
+
# summary: "Traefik high HTTP 4xx error rate on {{ $labels.service }}"
|
|
27
|
+
# description: "Traefik backend 4xx error rate is above 10% (currently at {{ $value }}%)"
|
|
28
|
+
# dashboard: "OVH:<MONITORING>/traefik"
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
apiVersion: monitoring.coreos.com/v1
|
|
2
|
+
kind: PrometheusRule
|
|
3
|
+
metadata:
|
|
4
|
+
name: velero-rules
|
|
5
|
+
namespace: prometheus
|
|
6
|
+
|
|
7
|
+
spec:
|
|
8
|
+
groups:
|
|
9
|
+
- name: Velero
|
|
10
|
+
rules:
|
|
11
|
+
- alert: VeleroBackupFailure
|
|
12
|
+
expr: (time() - velero_backup_last_successful_timestamp{schedule_version=~"2.[0]"} > 108000) and (velero_backup_success_total{schedule!=""} != 0)
|
|
13
|
+
for: 5m
|
|
14
|
+
labels:
|
|
15
|
+
severity: warning
|
|
16
|
+
annotations:
|
|
17
|
+
summary: "Velero schedule {{ $labels.schedule }} backup failed to execute properly"
|
|
18
|
+
description: "It has been over 30 hours since the last successful backup"
|
|
19
|
+
dashboard: "OVH:<MONITORING>/velero"
|
|
20
|
+
- alert: NoVeleroBackups
|
|
21
|
+
expr: velero_backup_success_total{schedule!=""} == 0
|
|
22
|
+
for: 30h
|
|
23
|
+
labels:
|
|
24
|
+
severity: warning
|
|
25
|
+
annotations:
|
|
26
|
+
summary: "Velero has not made any backups yet"
|
|
27
|
+
description: "No backups have successfully been made since velero was initialized (or restarted), go check it out ASAP"
|
|
28
|
+
dashboard: "OVH:<MONITORING>/velero"
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
#
|
|
2
|
+
# to force a reinstall of this service simply remove or rename this
|
|
3
|
+
# stackdriver-exporter subdirectory and rerun helmup stackdriver-exporter
|
|
4
|
+
#
|
|
5
|
+
fullnameOverride: "prometheus-stack-stackdriver-metrics"
|
|
6
|
+
|
|
7
|
+
stackdriver:
|
|
8
|
+
projectId: "OVH:<PROJECT_NAME>"
|
|
9
|
+
metrics:
|
|
10
|
+
typePrefixes: "pubsub.googleapis.com/subscription/oldest_unacked_message_age,pubsub.googleapis.com/subscription/num_undelivered_messages,pubsub.googleapis.com/subscription/pull_ack_request_count,pubsub.googleapis.com/subscription/streaming_pull_ack_request_count,pubsub.googleapis.com/topic/message_sizes,pubsub.googleapis.com/topic/send_request_count,firebasedatabase.googleapis.com/io/database_load,firebasedatabase.googleapis.com/network/sent_bytes_count,firebasedatabase.googleapis.com/network/active_connections"
|
|
11
|
+
|
|
12
|
+
# https://artifacthub.io/packages/helm/prometheus-community/prometheus-stackdriver-exporter?modal=values&path=serviceMonitor
|
|
13
|
+
serviceMonitor:
|
|
14
|
+
enabled: true
|
|
15
|
+
namespace: prometheus
|
|
16
|
+
interval: 20s
|
|
17
|
+
|
|
18
|
+
annotations:
|
|
19
|
+
prometheus.io/port: "9255"
|
|
20
|
+
prometheus.io/scrape: "true" # this is a string annotation - so quoted!
|
|
21
|
+
|
|
22
|
+
tolerations:
|
|
23
|
+
- key: "preemptible"
|
|
24
|
+
operator: "Equal"
|
|
25
|
+
value: "true"
|
|
26
|
+
effect: "NoSchedule"
|
|
27
|
+
|
|
28
|
+
affinity:
|
|
29
|
+
nodeAffinity:
|
|
30
|
+
requiredDuringSchedulingIgnoredDuringExecution:
|
|
31
|
+
nodeSelectorTerms:
|
|
32
|
+
- matchExpressions:
|
|
33
|
+
- key: target-env
|
|
34
|
+
operator: In
|
|
35
|
+
values:
|
|
36
|
+
- preemptible
|
|
37
|
+
|
|
38
|
+
resources:
|
|
39
|
+
requests:
|
|
40
|
+
cpu: 50m
|
|
41
|
+
memory: 32Mi
|
|
42
|
+
|
|
43
|
+
# NOTE to future selves - the exporter's helm chart does not have a clue
|
|
44
|
+
# regarding workload identity, which means the gcloud and k8s service
|
|
45
|
+
# accounts have to be managed outside of the chart by helmup. In order to get
|
|
46
|
+
# the linkages from the SA to the service we specify the SA name here, but
|
|
47
|
+
# disable the creation of the SA since it will have already have been created
|
|
48
|
+
# and bound by the helmup installStackdriverExporterEnvironment function.
|
|
49
|
+
#
|
|
50
|
+
serviceAccount:
|
|
51
|
+
create : false # this is a flag to helm - so unquoted ... da F?!
|
|
52
|
+
name: "stackdriver-exporter"
|