-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathenvoy_global.sls
327 lines (324 loc) · 21 KB
/
envoy_global.sls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
{% from "macros/envoy_stats.sls" import envoy_gauge_divisor %}
Ensure LightStep SR is high low urgency alert:
wavefront_alerts.present:
- name: LightStep SR is low
condition: $display < 97
displayExpression: rawsum(default(0, ts(production.infra.aws.ec2.asg.envoy.cluster.lightstep_saas.grpc.lightstep.collector.CollectorService.Report.success.count.sum))) / rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.lightstep_saas.grpc.lightstep.collector.CollectorService.Report.total.count.sum)) * 100
service: lightstep-low-urgency
minutes: 3
{% for db_name, canary in
[('Envoy-Global', False),
('Envoy-Global-Canary', True)] %}
Ensure {{db_name}} dashboard is managed:
lyft_dashboard.present:
- name: {{db_name}}
- base_rows_from_pillar:
- 'grafana_rows:title'
- base_panels_from_pillar:
- 'grafana_panels:no_fill'
- 'grafana_panels:hide_legend'
- 'grafana_panels:thin'
- 'grafana_panels:4span'
- pagerduty_target: envoy
- dashboard:
refresh: 1m
tags:
- managed
annotation_tags:
- "opsbase-deploy-production"
- "runtime-deploy-production"
time:
from: "now-6h"
to: "now-2m"
rows:
- title: Dashboard README
height: 50
showTitle: True
panels:
- title:
content: This dashboard represents global health state of all services. Explanation of these stats can be found [at this link](https://github.com/lyft/envoy-private/blob/master/docs/stats.md#envoy-global-stats)
type: text
- title: TOP LEVEL ALL ENVOYS
panels:
- title: RPS
datasource: wavefront
targets:
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.http.*.downstream_rq_total.count.rate))'
name: 'Global RPS'
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.*.health_check.attempt.count.rate))'
name: 'Global HC RPS'
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.http.*.rq_total.count.rate))'
name: 'Global Routed RPS'
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.lightstep_saas.upstream_rq_total.count.rate))'
name: 'Global Tracing RPS'
{% if canary %}
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.http.*.downstream_rq_total.instance.count.rate, canary=true))'
name: 'Canary Global RPS'
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.*.health_check.attempt.instance.count.rate, canary=true))'
name: 'Canary Global HC RPS'
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.http.*.rq_total.count.instance.rate, canary=true))'
name: 'Canary Global Routed RPS'
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.lightstep_saas.upstream_rq_total.instance.count.rate, canary=true))'
name: 'Canary Global Tracing RPS'
{% endif %}
- title: CPS
datasource: wavefront
targets:
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.http.*.downstream_cx_total.count.rate))'
name: 'Global CPS'
{% if canary %}
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.http.*.downstream_cx_total.instance.count.rate, canary=true))'
name: 'Canary Global CPS'
{% endif %}
- title: Success Rate (non-5xx responses)
datasource: wavefront
targets:
- target: '(1 - (rawsum(ts(production.infra.aws.ec2.asg.envoy.http.*.downstream_rq_5xx.count.sum)) / rawsum(ts(production.infra.aws.ec2.asg.envoy.http.*.downstream_rq_*xx.count.sum)))) * 100'
name: 'SR'
{% if canary %}
- target: '(1 - (rawsum(ts(production.infra.aws.ec2.asg.envoy.http.*.downstream_rq_5xx.instance.count.sum, canary=true)) / rawsum(ts(production.infra.aws.ec2.asg.envoy.http.*.downstream_rq_*xx.instance.count.sum, canary=true)))) * 100'
name: 'Canary SR'
{% endif %}
- title: Connections
datasource: wavefront
targets:
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.http.*.downstream_cx_active.gauge.sum)) / {{ envoy_gauge_divisor }}'
name: 'Global Connections'
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.server.parent_connections.gauge.sum)) / {{ envoy_gauge_divisor }}'
name: 'Global Parent Connections'
{% if canary %}
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.http.*.downstream_cx_active.instance.gauge.sum, canary=true)) / {{ envoy_gauge_divisor }}'
name: 'Canary Global Connections'
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.server.parent_connections.instance.gauge.sum, canary=true)) / {{ envoy_gauge_divisor }}'
name: 'Canary Global Parent Connections'
{% endif %}
- title: Deployed Version
datasource: wavefront
targets:
- target: 'ts(production.infra.aws.ec2.asg.envoy.server.version.gauge.min)'
- target: 'ts(production.infra.aws.ec2.asg.envoy.server.version.gauge.max)'
- title: Upstream failures
datasource: wavefront
targets:
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.*.upstream_rq_pending_failure_eject.count.rate))'
name: 'Pending Failure Ejection'
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.*.upstream_rq_pending_overflow.count.rate))'
name: 'Pending Overflow'
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.*.upstream_cx_connect_timeout.count.rate))'
name: 'Connect Timeout'
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.*.upstream_rq_timeout.count.rate))'
name: 'Request Timeout'
{% if canary %}
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.*.upstream_rq_pending_failure_eject.instance.count.rate, canary=true))'
name: 'Canary Pending Failure Ejection'
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.*.upstream_rq_pending_overflow.instance.count.rate, canary=true))'
name: 'Canary Pending Overflow'
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.*.upstream_cx_connect_timeout.instance.count.rate, canary=true))'
name: 'Canary Connect Timeout'
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.*.upstream_rq_timeout.instance.count.rate, canary=true))'
name: 'Canary Request Timeout'
{% endif %}
- title: Upstream Retries
datasource: wavefront
targets:
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.*.upstream_rq_retry.count.rate))'
name: 'Retry'
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.*.upstream_rq_retry_success.count.rate))'
name: 'Retry Success'
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.*.upstream_rq_retry_overflow.count.rate))'
name: 'Retry Overflow'
{% if canary %}
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.*.upstream_rq_retry.instance.count.rate, canary=true))'
name: 'Canary Retry'
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.*.upstream_rq_retry_success.instance.count.rate, canary=true))'
name: 'Canary Retry Success'
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.*.upstream_rq_retry_overflow.count.rate, canary=true))'
name: 'Canary Retry Overflow'
{% endif %}
- title: Outlier Detection
datasource: wavefront
targets:
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.*.outlier_detection.ejections_total.count.sum))'
name: 'Total ejections'
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.*.outlier_detection.ejections_overflow.count.sum))'
name: 'Total ejection overflows'
{% if canary %}
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.*.outlier_detection.ejections_total.count.sum, canary=true))'
name: 'Canary Total ejections'
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.*.outlier_detection.ejections_overflow.count.sum, canary=true))'
name: 'Canary Total ejection overflows'
{% endif %}
- title: Cross Zone Traffic
collapse: True
panels:
- title: RPS
datasource: wavefront
targets:
- target: 'rawsum(removeSeries(taggify(taggify(taggify(ts(production.infra.aws.ec2.asg.envoy.cluster.*.zone.*.upstream_rq_*xx.count.rate), metric, cluster, 7), metric, from_zone, 9), metric, to_zone, 10), cluster=jenkins), from_zone, to_zone)'
regexes:
- regex: "from_zone='([^']+)'.*to_zone='([^']+)'"
replacement: "$1.$2"
{% if canary %}
- target: 'rawsum(removeSeries(taggify(taggify(taggify(ts(production.infra.aws.ec2.asg.envoy.cluster.*.zone.*.upstream_rq_*xx.instance.count.rate, canary=true), metric, cluster, 7), metric, from_zone, 9), metric, to_zone, 10), cluster=jenkins), from_zone, to_zone)'
regexes:
- regex: "from_zone='([^']+)'.*to_zone='([^']+)'"
replacement: "Canary $1.$2"
{% endif %}
- title: P50 LATENCY
datasource: wavefront
targets:
- target: 'rawavg(removeSeries(taggify(taggify(taggify(ts(production.infra.aws.ec2.asg.envoy.cluster.*.zone.*.upstream_rq_time.timer.p50), metric, cluster, 7), metric, from_zone, 9), metric, to_zone, 10), cluster=jenkins), from_zone, to_zone)'
regexes:
- regex: "from_zone='([^']+)'.*to_zone='([^']+)'"
replacement: "$1.$2.p50"
{% if canary %}
- target: 'rawavg(removeSeries(taggify(taggify(taggify(ts(production.infra.aws.ec2.asg.envoy.cluster.*.zone.*.upstream_rq_time.instance.timer.p50, canary=true), metric, cluster, 7), metric, from_zone, 9), metric, to_zone, 10), cluster=jenkins), from_zone, to_zone)'
regexes:
- regex: "from_zone='([^']+)'.*to_zone='([^']+)'"
replacement: "Canary $1.$2.p50"
{% endif %}
- title: P95 LATENCY
datasource: wavefront
targets:
- target: 'rawavg(removeSeries(taggify(taggify(taggify(ts(production.infra.aws.ec2.asg.envoy.cluster.*.zone.*.upstream_rq_time.timer.p95), metric, cluster, 7), metric, from_zone, 9), metric, to_zone, 10), cluster=jenkins), from_zone, to_zone)'
regexes:
- regex: "from_zone='([^']+)'.*to_zone='([^']+)'"
replacement: "$1.$2.p95"
{% if canary %}
- target: 'rawavg(removeSeries(taggify(taggify(taggify(ts(production.infra.aws.ec2.asg.envoy.cluster.*.zone.*.upstream_rq_time.instance.timer.p95, canary=true), metric, cluster, 7), metric, from_zone, 9), metric, to_zone, 10), cluster=jenkins), from_zone, to_zone)'
regexes:
- regex: "from_zone='([^']+)'.*to_zone='([^']+)'"
replacement: "Canary $1.$2.p95"
{% endif %}
alarms:
- name: "Heightened P95 Latency"
query: 'rawavg(removeSeries(taggify(taggify(taggify(ts(production.infra.aws.ec2.asg.envoy.cluster.*.zone.*.upstream_rq_time.timer.p95), metric, cluster, 7), metric, from_zone, 9), metric, to_zone, 10), cluster=jenkins), from_zone, to_zone)'
condition: '(($query - mmedian(200m, $query))/(mpercentile(200m, 75, $query) - mpercentile(200m, 25, $query))) > 3'
hide: true
minutes: 10
- title: P99 LATENCY
datasource: wavefront
targets:
- target: 'rawavg(removeSeries(taggify(taggify(taggify(ts(production.infra.aws.ec2.asg.envoy.cluster.*.zone.*.upstream_rq_time.timer.p99), metric, cluster, 7), metric, from_zone, 9), metric, to_zone, 10), cluster=jenkins), from_zone, to_zone)'
regexes:
- regex: "from_zone='([^']+)'.*to_zone='([^']+)'"
replacement: "$1.$2.p99"
{% if canary %}
- target: 'rawavg(removeSeries(taggify(taggify(taggify(ts(production.infra.aws.ec2.asg.envoy.cluster.*.zone.*.upstream_rq_time.instance.timer.p99, canary=true), metric, cluster, 7), metric, from_zone, 9), metric, to_zone, 10), cluster=jenkins), from_zone, to_zone)'
regexes:
- regex: "from_zone='([^']+)'.*to_zone='([^']+)'"
replacement: "Canary $1.$2.p99"
{% endif %}
- title: RATELIMIT
collapse: True
panels:
- title: TCP limiter per second
datasource: wavefront
targets:
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.ratelimit.*.over_limit.count.rate))'
name: 'Global Over Limit'
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.ratelimit.*.ok.count.rate))'
name: 'Global OK'
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.ratelimit.*.error.count.rate))'
name: 'Global Error'
{% if canary %}
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.ratelimit.*.over_limit.instance.count.rate, canary=true))'
name: Canary Global RPS
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.ratelimit.*.ok.instance.count.rate, canary=true))'
name: 'Canary Global OK'
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.ratelimit.*.error.instance.count.rate, canary=true))'
name: 'Canary Global Error'
{% endif%}
- title: HTTP limiter per second
datasource: wavefront
targets:
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.*.ratelimit.over_limit.count.rate))'
name: 'Global Over Limit'
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.*.ratelimit.ok.count.rate))'
name: 'Global OK'
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.*.ratelimit.error.count.rate))'
name: 'Global Error'
{% if canary %}
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.*.ratelimit.over_limit.instance.count.rate, canary=true))'
name: Canary Global RPS
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.*.ratelimit.ok.instance.count.rate, canary=true))'
name: 'Canary Global OK'
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.*.ratelimit.error.instance.count.rate, canary=true))'
name: 'Canary Global Error'
{% endif%}
- title: LIGHTSTEP GLOBAL
collapse: True
panels:
- title: RPS
datasource: wavefront
targets:
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.lightstep_saas.upstream_rq_total.count.rate))'
name: 'Global RPS'
{% if canary %}
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.lightstep_saas.upstream_rq_total.instance.count.rate, canary=true))'
name: Canary Global RPS
{% endif%}
- title: Spans Per Second
datasource: wavefront
targets:
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.tracing.lightstep.spans_sent.count.rate))'
name: 'Global Spans Per Second'
{% if canary %}
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.tracing.lightstep.spans_sent.instance.count.rate, canary=true))'
name: 'Canary Global Spans Per Second'
{% endif%}
- title: Success Rate (gRPC requests)
datasource: wavefront
targets:
- target: '(1 - (rawsum(default(0, ts(production.infra.aws.ec2.asg.envoy.cluster.lightstep_saas.grpc.lightstep.collector.CollectorService.Report.failure.count.sum))) / rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.lightstep_saas.grpc.lightstep.collector.CollectorService.Report.total.count.sum)))) * 100'
name: 'SR'
{% if canary %}
- target: '(1 - (rawsum(default(0, ts(production.infra.aws.ec2.asg.envoy.cluster.lightstep_saas.grpc.lightstep.collector.CollectorService.Report.failure.instance.count.sum, canary=true))) / rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.lightstep_saas.grpc.lightstep.collector.CollectorService.Report.total.instance.count.sum, canary=true)))) * 100'
name: 'Canary SR'
{% endif %}
- title: LightStep failures
datasource: wavefront
targets:
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.lightstep_saas.upstream_rq_pending_failure_eject.count.rate))'
name: 'Pending Failure Ejection'
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.lightstep_saas.upstream_rq_pending_overflow.count.rate))'
name: 'Pending Overflow'
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.lightstep_saas.upstream_cx_connect_timeout.count.rate))'
name: 'Connect Timeout'
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.lightstep_saas.upstream_rq_timeout.count.rate))'
name: 'Request Timeout'
{% if canary %}
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.lightstep_saas.upstream_rq_pending_failure_eject.instance.count.rate, canary=true))'
name: 'Canary Pending Failure Ejection'
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.lightstep_saas.upstream_rq_pending_overflow.instance.count.rate, canary=true))'
name: 'Canary Pending Overflow'
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.lightstep_saas.upstream_cx_connect_timeout.instance.count.rate, canary=true))'
name: 'Canary Connect Timeout'
- target: 'rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.lightstep_saas.upstream_rq_timeout.instance.count.rate, canary=true))'
name: 'Canary Request Timeout'
{% endif %}
- title: CUSTOM CONFIG
collapse: True
panels:
- title: Custom Config Attemps
datasource: wavefront
targets:
- target: 'ts(production.app.configgen.custom_config.create_attempt.count.count)'
- title: Custom Config Failures
datasource: wavefront
alarms:
- name: "Custom Config Failure"
query: 'mcount(5m, ts(production.app.configgen.custom_config.create_failure.count.count))'
condition: $query > 0
minutes: 2
- title: ENVOY SERVER CRASHES
collapse: True
panels:
- title: Envoy Server Crashes
datasource: wavefront
alarms:
- name: "Envoy Server Crashes"
query: 'msum(10m, ts(production.infra.aws.ec2.asg.envoy.server.crashes.count.sum))'
condition: $query > 5
minutes: 2
{% endfor %}