-
Notifications
You must be signed in to change notification settings - Fork 13
/
envoy_stats.sls
478 lines (472 loc) · 36.3 KB
/
envoy_stats.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
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
{% set envoy_gauge_divisor = 120 %}
{% macro ingress_stats(remote_service_cluster, canary=False, error_rate_percent_5xx=False, collapse=False) %}
- title: {{remote_service_cluster}} INGRESS
collapse: {{ collapse }}
showTitle: True
panels:
- title: Ingress CPS / RPS
datasource: wavefront
targets:
- target: ts($environment.infra.aws.ec2.asg.envoy.http.ingress_http.rq_total.count.rate, asg={{remote_service_cluster}} and window=60)
name: RPS
- target: ts($environment.infra.aws.ec2.asg.envoy.http.ingress_http.downstream_cx_total.count.rate, asg={{remote_service_cluster}} and window=60)
name: CPS
{% if canary %}
- target: ts(production.infra.aws.ec2.asg.envoy.http.ingress_http.rq_total.instance.count.rate, asg={{remote_service_cluster}} and window=60)
name: canary RPS
- target: ts(production.infra.aws.ec2.asg.envoy.http.ingress_http.downstream_cx_total.instance.count.rate, asg={{remote_service_cluster}} and window=60)
name: canary CPS
{% endif %}
- title: Total Connections / Requests
datasource: wavefront
targets:
- target: ts($environment.infra.aws.ec2.asg.envoy.http.ingress_http.downstream_cx_active.gauge.sum, asg={{remote_service_cluster}} and window=60)/{{ envoy_gauge_divisor }}
name: ingress connections
- target: ts($environment.infra.aws.ec2.asg.envoy.http.ingress_http.downstream_rq_active.gauge.sum, asg={{remote_service_cluster}} and window=60)/{{ envoy_gauge_divisor }}
name: ingress requests
{% if canary %}
- target: ts(production.infra.aws.ec2.asg.envoy.http.ingress_http.downstream_cx_active.instance.gauge.sum, asg={{remote_service_cluster}} and window=60)/{{ envoy_gauge_divisor }}
name: canary ingress connections
- target: ts(production.infra.aws.ec2.asg.envoy.http.ingress_http.downstream_rq_active.instance.gauge.sum, asg={{remote_service_cluster}} and window=60)/{{ envoy_gauge_divisor }}
name: canary ingress requests
{% endif %}
- title: Response Time
datasource: wavefront
targets:
- target: ts($environment.infra.aws.ec2.asg.envoy.http.ingress_http.downstream_rq_time.timer.p50, asg={{remote_service_cluster}} and window=60)
name: p50
- target: ts($environment.infra.aws.ec2.asg.envoy.http.ingress_http.downstream_rq_time.timer.p95, asg={{remote_service_cluster}} and window=60)
name: p95
- target: ts($environment.infra.aws.ec2.asg.envoy.http.ingress_http.downstream_rq_time.timer.p99, asg={{remote_service_cluster}} and window=60)
name: p99
{% if canary %}
- target: ts(production.infra.aws.ec2.asg.envoy.http.ingress_http.downstream_rq_time.instance.timer.p50, asg={{remote_service_cluster}} and window=60)
name: canary p50
- target: ts(production.infra.aws.ec2.asg.envoy.http.ingress_http.downstream_rq_time.instance.timer.p95, asg={{remote_service_cluster}} and window=60)
name: canary p95
- target: ts(production.infra.aws.ec2.asg.envoy.http.ingress_http.downstream_rq_time.instance.timer.p99, asg={{remote_service_cluster}} and window=60)
name: canary p99
{% endif %}
y_formats:
- ms
- short
- title: Success Rate (non-5xx responses)
datasource: wavefront
targets:
- target: 100 * (1 - rawsum(ts($environment.infra.aws.ec2.asg.envoy.http.ingress_http.downstream_rq_5xx.count.rate, asg={{remote_service_cluster}} and window=60))/rawsum(ts($environment.infra.aws.ec2.asg.envoy.http.ingress_http.downstream_rq_*xx.count.rate, asg={{remote_service_cluster}} and window=60)))
name: prod
{% if canary %}
- target: 100 * (1 - rawsum(ts(production.infra.aws.ec2.asg.envoy.http.ingress_http.downstream_rq_5xx.instance.count.rate, asg={{remote_service_cluster}} and window=60))/rawsum(ts(production.infra.aws.ec2.asg.envoy.http.ingress_http.downstream_rq_*xx.count.rate, asg={{remote_service_cluster}} and window=60)))
name: canary
{% endif %}
{% if error_rate_percent_5xx %}
- target: 100.0 - error_rate_percent_5xx
name: min
{% endif %}
y_formats:
- percent
- title: 4xx %
datasource: wavefront
targets:
- target: 100 * rawsum(ts($environment.infra.aws.ec2.asg.envoy.http.ingress_http.downstream_rq_4xx.count.rate, asg={{remote_service_cluster}} and window=60))/rawsum(ts($environment.infra.aws.ec2.asg.envoy.http.ingress_http.downstream_rq_*xx.count.rate, asg={{remote_service_cluster}} and window=60))
name: prod
{% if canary %}
- target: 100 * rawsum(ts(production.infra.aws.ec2.asg.envoy.http.ingress_http.downstream_rq_4xx.instance.count.rate, asg={{remote_service_cluster}} and window=60))/rawsum(ts(production.infra.aws.ec2.asg.envoy.http.ingress_http.downstream_rq_*xx.count.rate, asg={{remote_service_cluster}} and window=60))
name: canary
{% endif %}
y_formats:
- percent
- title: Local Service Errors
datasource: wavefront
targets:
- target: ts($environment.infra.aws.ec2.asg.envoy.http.ingress_http.downstream_cx_destroy_local_active_rq.count.rate, asg={{remote_service_cluster}} and window=60)
name: cx closed local with active rq
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.local_service.upstream_cx_destroy_remote_with_active_rq.count.rate, asg={{remote_service_cluster}} and window=60)
name: cx closed remote with active rq
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.local_service.upstream_cx_connect_timeout.count.rate, asg={{remote_service_cluster}} and window=60)
name: connect timeout
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.local_service.upstream_rq_pending_failure_eject.count.rate, asg={{remote_service_cluster}} and window=60)
name: pending failure ejection
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.local_service.upstream_rq_pending_overflow.count.rate, asg={{remote_service_cluster}} and window=60)
name: pending overflow
{% if canary %}
- target: ts(production.infra.aws.ec2.asg.envoy.http.ingress_http.downstream_cx_destroy_local_active_rq.instance.count.rate, asg={{remote_service_cluster}} and window=60)
name: canary cx closed local with active rq
- target: ts(production.infra.aws.ec2.asg.envoy.cluster.local_service.upstream_cx_destroy_remote_with_active_rq.instance.count.rate, asg={{remote_service_cluster}} and window=60)
name: canary cx closed remote with active rq
- target: ts(production.infra.aws.ec2.asg.envoy.cluster.local_service.upstream_cx_connect_timeout.instance.count.rate, asg={{remote_service_cluster}} and window=60)
name: canary connect timeout
- target: ts(production.infra.aws.ec2.asg.envoy.cluster.local_service.upstream_rq_pending_failure_eject.instance.count.rate, asg={{remote_service_cluster}} and window=60)
name: canary pending failure ejection
- target: ts(production.infra.aws.ec2.asg.envoy.cluster.local_service.upstream_rq_pending_overflow.instance.count.rate, asg={{remote_service_cluster}} and window=60)
name: canary pending overflow
{% endif %}
- title: Local Service GRPC Errors
datasource: wavefront
targets:
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.local_service_grpc.upstream_cx_destroy_remote_with_active_rq.count.rate, asg={{remote_service_cluster}} and window=60)
name: cx closed remote with active rq
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.local_service_grpc.upstream_cx_connect_timeout.count.rate, asg={{remote_service_cluster}} and window=60)
name: connect timeout
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.local_service_grpc.upstream_rq_pending_failure_eject.count.rate, asg={{remote_service_cluster}} and window=60)
name: pending failure ejection
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.local_service_grpc.upstream_rq_pending_overflow.count.rate, asg={{remote_service_cluster}} and window=60)
name: pending overflow
{% if canary %}
- target: ts(production.infra.aws.ec2.asg.envoy.cluster.local_service_grpc.upstream_cx_destroy_remote_with_active_rq.instance.count.rate, asg={{remote_service_cluster}} and window=60)
name: canary cx closed remote with active rq
- target: ts(production.infra.aws.ec2.asg.envoy.cluster.local_service_grpc.upstream_cx_connect_timeout.instance.count.rate, asg={{remote_service_cluster}} and window=60)
name: canary connect timeout
- target: ts(production.infra.aws.ec2.asg.envoy.cluster.local_service_grpc.upstream_rq_pending_failure_eject.instance.count.rate, asg={{remote_service_cluster}} and window=60)
name: canary pending failure ejection
- target: ts(production.infra.aws.ec2.asg.envoy.cluster.local_service_grpc.upstream_rq_pending_overflow.instance.count.rate, asg={{remote_service_cluster}} and window=60)
name: canary pending overflow
{% endif %}
{{ downstream_requests(remote_service_cluster) }}
- title: Flow Control
datasource: wavefront
span: 3
targets:
- target: 'ts($environment.infra.aws.ec2.asg.envoy.http.ingress_http.downstream_flow_control_paused_reading_total.count.rate, asg={{remote_service_cluster}} and window=60)'
name: total paused reads
- target: 'ts($environment.infra.aws.ec2.asg.envoy.http.ingress_http.downstream_flow_control_resumed_reading_total.count.rate, asg={{remote_service_cluster}} and window=60)'
name: total paused reads
{% if canary %}
- target: ts(production.infra.aws.ec2.asg.envoy.http.ingress_http.downstream_flow_control_paused_reading_total.instance.count.rate, asg={{remote_service_cluster}} and window=60)
name: canary total paused reads
- target: ts(production.infra.aws.ec2.asg.envoy.http.ingress_http.downstream_flow_control_resumed_reading_total.instance.count.rate, asg={{remote_service_cluster}} and window=60)
name: canary total paused reads
{% endif %}
- title: Overly Large Request and Response Bodies
datasource: wavefront
span: 3
targets:
- target: ts($environment.infra.aws.ec2.asg.envoy.http.ingress_http.downstream_rq_too_large.count.rate, asg={{remote_service_cluster}} and window=60)
name: Request body too large
- target: ts($environment.infra.aws.ec2.asg.envoy.http.ingress_http.rs_too_large.count.rate, asg={{remote_service_cluster}} and window=60)
name: Response body too large
{% if canary %}
- target: ts(production.infra.aws.ec2.asg.envoy.http.ingress_http.downstream_rq_too_large.instance.count.rate, asg={{remote_service_cluster}} and window=60)
name: canary request body too large
- target: ts(production.infra.aws.ec2.asg.envoy.http.ingress_http.rs_too_large.instance.count.rate, asg={{remote_service_cluster}} and window=60)
name: canary response body too large
{% endif %}
{% endmacro %}
{% macro egress_stats(originating_service, destination_service, canary=False, show_grpc=True, collapse=False) %}
- title: 'Egress from {{originating_service}} to {{destination_service}}'
collapse: {{ collapse }}
showTitle: True
panels:
- title: Egress CPS / RPS
datasource: wavefront
targets:
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_cx_total.count.rate, asg={{originating_service}} and window=60)
name: egress CPS
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_total.count.rate, asg={{originating_service}} and window=60)
name: egress RPS
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_pending_total.count.rate, asg={{originating_service}} and window=60)
name: pending req to
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.lb_healthy_panic.count.rate, asg={{originating_service}} and window=60)
name: lb healthy panic RPS
- title: Total Connections / Requests
datasource: wavefront
targets:
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_cx_active.gauge.sum, asg={{originating_service}} and window=60)/{{ envoy_gauge_divisor }}
name: connections
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_active.gauge.sum, asg={{originating_service}} and window=60)/{{ envoy_gauge_divisor }}
name: requests
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_pending_active.gauge.sum, asg={{originating_service}} and window=60)/{{ envoy_gauge_divisor }}
- title: Cluster Membership
datasource: wavefront
targets:
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.membership_change.count.sum, asg={{originating_service}} and window=60)
name: membership changes
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.membership_total.gauge.mean, asg={{originating_service}} and window=60)
name: total membership
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.outlier_detection.ejections_active.gauge.mean, asg={{originating_service}} and window=60)
name: outlier ejections active
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.membership_healthy.gauge.mean, asg={{originating_service}} and window=60)
name: healthy members (active HC and outlier)
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.health_check.healthy.gauge.mean, asg={{originating_service}} and window=60)
name: healthy members (active HC only)
- title: Upstream Response Time
datasource: wavefront
targets:
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_time.timer.p50, asg={{originating_service}} and window=60)
name: p50
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_time.timer.p95, asg={{originating_service}} and window=60)
name: p95
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_time.timer.p99, asg={{originating_service}} and window=60)
name: p99
{% if canary %}
- target: ts(production.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_time.instance.timer.p50, asg={{originating_service}} and window=60)
name: canary p50
- target: ts(production.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_time.instance.timer.p95, asg={{originating_service}} and window=60)
name: canary p95
- target: ts(production.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_time.instance.timer.p99, asg={{originating_service}} and window=60)
name: canary p99
{% endif %}
y_formats:
- ms
- short
- title: Success Rate (non-5xx responses)
datasource: wavefront
targets:
- target: 100 * (1 - (rawsum(ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_5xx.count.rate, asg={{originating_service}} and window=60))/rawsum(ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_*xx.count.rate, asg={{originating_service}} and window=60))))
name: prod
{% if canary %}
- target: 100 * (1 - rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_5xx.instance.count.rate, asg={{originating_service}} and window=60))/rawsum(ts(production.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_*xx.instance.count.rate, asg={{originating_service}} and window=60)))
name: canary
{% endif %}
y_formats:
- percent
- title: 4xx %
datasource: wavefront
targets:
- target: 100 * (rawsum(ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_4xx.count.rate, asg={{originating_service}} and window=60))/rawsum(ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_*xx.count.rate, asg={{originating_service}} and window=60)))
name: prod
{% if canary %}
- target: 100 * (rawsum(ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_4xx.instance.count.rate, asg={{originating_service}} and window=60))/rawsum(ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_*xx.instance.count.rate, asg={{originating_service}} and window=60)))
name: canary
{% endif %}
y_formats:
- percent
- title: Upstream Request Errors
datasource: wavefront
targets:
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_cx_connect_timeout.count.rate, asg={{originating_service}} and window=60)
name: connect timeout
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_pending_failure_eject.count.rate, asg={{originating_service}} and window=60)
name: pending failure ejection
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_pending_overflow.count.rate, asg={{originating_service}} and window=60)
name: pending overflow
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_timeout.count.rate, asg={{originating_service}} and window=60)
name: request timeout
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_per_try_timeout.count.rate, asg={{originating_service}} and window=60)
name: per try request timeout
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_rx_reset.count.rate, asg={{originating_service}} and window=60)
name: request reset
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_cx_destroy_local_with_active_rq.count.rate, asg={{originating_service}} and window=60)
name: destroy initialized from originating service
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_cx_destroy_remote_with_active_rq.count.rate, asg={{originating_service}} and window=60)
name: destroy initialized from destination service
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_maintenance_mode.count.rate, asg={{originating_service}} and window=60)
name: request failed maintenance mode
- title: Upstream Request Retry
datasource: wavefront
targets:
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_retry.count.rate, asg={{originating_service}} and window=60)
name: request retry
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_retry_success.count.rate, asg={{originating_service}} and window=60)
name: request retry success
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_retry_overflow.count.rate, asg={{originating_service}} and window=60)
name: request retry overflow
- title: Upstream Flow Control
span: 3
datasource: wavefront
targets:
- target: 'ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_flow_control_paused_reading_total.count.rate, asg={{originating_service}} and window=60)'
name: paused reading from destination service
- target: 'ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_flow_control_resumed_reading_total.count.rate, asg={{originating_service}} and window=60)'
name: resumed reading from destination service
- target: 'ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_flow_control_backed_up_total.count.rate, asg={{originating_service}} and window=60)'
name: paused reading from originating service
- target: 'ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_flow_control_drained_total.count.rate, asg={{originating_service}} and window=60)'
name: resumed reading from originating service
- title: Outlier Detection
span: 3
datasource: wavefront
targets:
- target: 'ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.outlier_detection.ejections_total.count.sum, asg={{originating_service}} and window=60)'
name: 'Total ejections'
- target: 'ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.outlier_detection.ejections_overflow.count.sum, asg={{originating_service}} and window=60)'
name: 'Total ejection overflows'
{% if show_grpc %}
- title: GRPC Success Rates per method
span: 3
datasource: wavefront
targets:
- target: 100*(rawsum(taggify(align(1m,default(0, ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.grpc.pb.lyft.*.success.count.sum, asg={{originating_service}} and window=60))), metric, methodname, 13), methodname)) / (rawsum(taggify(align(1m,default(0, ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.grpc.pb.lyft.*.total.count.sum, asg={{originating_service}} and window=60))), metric, methodname, 13), methodname))
regexes:
- regex: "methodname='([^']+)'"
replacement: $1
y_formats:
- percent
- title: GRPC RPS per method
span: 3
datasource: wavefront
targets:
- target: taggify(ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.grpc.pb.lyft.*.total.count.rate, asg={{originating_service}} and window=60), metric, methodname, 13)
regexes:
- regex: "methodname='([^']+)'"
replacement: $1
{% endif %}
- title: 'CROSS ZONE EGRESS from {{originating_service}} to {{destination_service}}'
collapse: True
panels:
- title: RPS
datasource: wavefront
targets:
- target: 'rawsum(taggify(taggify(ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.zone.*.upstream_rq_*xx.count.rate, asg={{originating_service}} and window=60), metric, from_zone, 9), metric, to_zone, 10), from_zone, to_zone)'
regexes:
- regex: "from_zone='([^']+)'.*to_zone='([^']+)'"
replacement: "$1.$2"
- title: P50 LATENCY
datasource: wavefront
targets:
- target: 'rawavg(taggify(taggify(ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.zone.*.upstream_rq_time.timer.p50, asg={{originating_service}} and window=60), metric, from_zone, 9), metric, to_zone, 10), from_zone, to_zone)'
regexes:
- regex: "from_zone='([^']+)'.*to_zone='([^']+)'"
replacement: "$1.$2.p50"
- title: P95 LATENCY
datasource: wavefront
targets:
- target: 'rawavg(taggify(taggify(ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.zone.*.upstream_rq_time.timer.p95, asg={{originating_service}} and window=60), metric, from_zone, 9), metric, to_zone, 10), from_zone, to_zone)'
regexes:
- regex: "from_zone='([^']+)'.*to_zone='([^']+)'"
replacement: "$1.$2.p95"
- title: P99 LATENCY
datasource: wavefront
targets:
- target: 'rawavg(taggify(taggify(ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.zone.*.upstream_rq_time.timer.p99, asg={{originating_service}} and window=60), metric, from_zone, 9), metric, to_zone, 10), from_zone, to_zone)'
regexes:
- regex: "from_zone='([^']+)'.*to_zone='([^']+)'"
replacement: "$1.$2.p99"
{% endmacro %}
{% macro circuit_breaking(originating_service, destination_service) %}
- title: 'Circuit breaking'
collapse: True
showTitle: True
panels:
- title: {{destination_service}} connection overflow
datasource: wavefront
targets:
- target: ts($environment.infra.aws.ec2.instance.envoy.cluster.local_service.upstream_cx_overflow.count.sum, asg={{destination_service}})
regexes:
- regex: "host='([^']+)'"
replacement: "host: $1"
- title: {{destination_service}} request overflow
datasource: wavefront
targets:
- target: ts($environment.infra.aws.ec2.instance.envoy.cluster.local_service.upstream_rq_pending_overflow.count.sum, asg={{destination_service}})
regexes:
- regex: "host='([^']+)'"
replacement: "host: $1"
- title: {{originating_service}} to {{destination_service}} retry overflow
datasource: wavefront
targets:
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_retry_overflow.count.sum, asg={{originating_service}})
name: retry overflow
- title: {{originating_service}} to {{destination_service}} connection overflow
datasource: wavefront
targets:
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_cx_overflow.count.sum, asg={{originating_service}})
name: connection overflow
- title: {{originating_service}} to {{destination_service}} request overflow
datasource: wavefront
targets:
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_pending_overflow.count.sum, asg={{originating_service}})
name: request overflow
{% endmacro %}
{% macro upstream_http_success_rate_alarm_panel(originating_service, destination_service, success_percentage=99, alarm_minutes=2, alarm_target=None) %}
- title: {{ originating_service }}->{{ destination_service }} HTTP success rate
datasource: wavefront
alarms:
- name: HTTP Success rate for {{ originating_service }}->{{ destination_service }} below threshold
query: 100 * (1 - (align(1m, (( default(4w, 0, rawsum(ts($environment.infra.aws.ec2.asg.envoy.cluster.{{ destination_service }}.upstream_rq_5xx.count.rate, asg={{ originating_service }} and region=iad and window=60)) ))))/default(4w, 0, rawsum(ts($environment.infra.aws.ec2.asg.envoy.cluster.{{ destination_service }}.upstream_rq_total.count.rate, asg={{ originating_service }} and region=iad and window=60)))))
condition: $query < {{ success_percentage }}
minutes: {{ alarm_minutes}}
{% if alarm_target %}
service: {{ alarm_target }}
{% endif %}
tags:
lightstep_target_type: error
{% endmacro %}
{% macro upstream_grpc_success_rate_alarm_panel(originating_service, destination_service, success_percentage=99, alarm_minutes=2, alarm_target=None) %}
- title: {{ originating_service }}->{{ destination_service }} GRPC success rate
datasource: wavefront
alarms:
- name: GRPC Success rate for {{ originating_service }}->{{ destination_service }} below threshold
query: 100*(rawsum(taggify(align(1m,default(0, ts($environment.infra.aws.ec2.asg.envoy.cluster.{{ destination_service }}.grpc.pb.lyft.*.success.count.sum, asg={{ originating_service }} and window=60))), metric, methodname, 13), methodname)) / (rawsum(taggify(align(1m,default(0, ts($environment.infra.aws.ec2.asg.envoy.cluster.{{ destination_service }}.grpc.pb.lyft.*.total.count.sum, asg={{ originating_service }} and window=60))), metric, methodname, 13), methodname))
condition: $query < {{ success_percentage }}
minutes: {{ alarm_minutes}}
{% if alarm_target %}
service: {{ alarm_target }}
{% endif %}
tags:
lightstep_target_type: error
{% endmacro %}
{% macro downstream_requests(destination_service) %}
- title: Total requests per second
datasource: wavefront
span: 3
targets:
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_total.count.rate, window=60)
regexes:
- regex: "asg='([^']+)'"
replacement: $1
- title: Total 5xx requests per second
datasource: wavefront
span: 3
targets:
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_5xx.count.rate, window=60)
regexes:
- regex: "asg='([^']+)'"
replacement: $1
- title: Total request errors per second
datasource: wavefront
span: 3
targets:
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_cx_connect_timeout.count.rate, window=60)
regexes:
- regex: "asg='([^']+)'"
replacement: connect timeout $1
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_pending_failure_eject.count.rate, window=60)
regexes:
- regex: "asg='([^']+)'"
replacement: pending failure ejection $1
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_pending_overflow.count.rate, window=60)
regexes:
- regex: "asg='([^']+)'"
replacement: pending overflow $1
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_timeout.count.rate, window=60)
regexes:
- regex: "asg='([^']+)'"
replacement: request timeout $1
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_per_try_timeout.count.rate, window=60)
regexes:
- regex: "asg='([^']+)'"
replacement: per try request timeout $1
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_rx_reset.count.rate, window=60)
regexes:
- regex: "asg='([^']+)'"
replacement: request reset $1
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_cx_destroy_local_with_active_rq.count.rate, window=60)
regexes:
- regex: "asg='([^']+)'"
replacement: destroy initialized from $1
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_cx_destroy_remote_with_active_rq.count.rate, window=60)
regexes:
- regex: "asg='([^']+)'"
replacement: destroy initialized from destination service seen in $1
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_maintenance_mode.count.rate, window=60)
regexes:
- regex: "asg='([^']+)'"
replacement: request failed maintenance mode $1
- title: Total request retries per second
datasource: wavefront
span: 3
targets:
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_retry.count.rate, window=60)
regexes:
- regex: "asg='([^']+)'"
replacement: request retry $1
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_retry_success.count.rate, window=60)
regexes:
- regex: "asg='([^']+)'"
replacement: request retry success $1
- target: ts($environment.infra.aws.ec2.asg.envoy.cluster.{{destination_service}}.upstream_rq_retry_overflow.count.rate, window=60)
regexes:
- regex: "asg='([^']+)'"
replacement: request retry overflow $1
{% endmacro%}