@zigordev/stack 0.0.0-stage → 1.0.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.
@@ -0,0 +1,623 @@
1
+ {
2
+ "apiVersion": "dashboard.grafana.app/v1",
3
+ "kind": "Dashboard",
4
+ "metadata": {
5
+ "name": "app",
6
+ "annotations": {
7
+ "grafana.app/folder": "zigordev"
8
+ }
9
+ },
10
+ "spec": {
11
+ "timezone": "browser",
12
+ "editable": false,
13
+ "graphTooltip": 0,
14
+ "fiscalYearStartMonth": 0,
15
+ "schemaVersion": 42,
16
+ "templating": {
17
+ "list": [
18
+ {
19
+ "type": "query",
20
+ "name": "app",
21
+ "skipUrlSync": false,
22
+ "multi": false,
23
+ "allowCustomValue": true,
24
+ "includeAll": false,
25
+ "auto": false,
26
+ "auto_min": "10s",
27
+ "auto_count": 30,
28
+ "label": "App",
29
+ "datasource": {
30
+ "type": "prometheus",
31
+ "uid": "prometheus"
32
+ },
33
+ "query": "label_values(http_server_request_duration_seconds_count, service_name)",
34
+ "refresh": 2,
35
+ "sort": 1
36
+ }
37
+ ]
38
+ },
39
+ "annotations": {},
40
+ "title": "App",
41
+ "uid": "app",
42
+ "tags": [
43
+ "zigordev"
44
+ ],
45
+ "refresh": "30s",
46
+ "time": {
47
+ "from": "now-1h",
48
+ "to": "now"
49
+ },
50
+ "panels": [
51
+ {
52
+ "type": "row",
53
+ "collapsed": false,
54
+ "id": 0,
55
+ "panels": [],
56
+ "title": "Now",
57
+ "gridPos": {
58
+ "x": 0,
59
+ "y": 0,
60
+ "h": 1,
61
+ "w": 24
62
+ }
63
+ },
64
+ {
65
+ "type": "stat",
66
+ "transparent": false,
67
+ "repeatDirection": "h",
68
+ "options": {
69
+ "graphMode": "area",
70
+ "colorMode": "value",
71
+ "justifyMode": "auto",
72
+ "textMode": "auto",
73
+ "wideLayout": true,
74
+ "showPercentChange": false,
75
+ "reduceOptions": {
76
+ "calcs": []
77
+ },
78
+ "percentChangeColorMode": "standard",
79
+ "orientation": "auto"
80
+ },
81
+ "id": 1,
82
+ "title": "Copies reporting",
83
+ "datasource": {
84
+ "type": "prometheus",
85
+ "uid": "prometheus"
86
+ },
87
+ "fieldConfig": {
88
+ "defaults": {
89
+ "unit": "short"
90
+ },
91
+ "overrides": []
92
+ },
93
+ "gridPos": {
94
+ "h": 4,
95
+ "w": 6,
96
+ "x": 0,
97
+ "y": 1
98
+ },
99
+ "targets": [
100
+ {
101
+ "expr": "count(target_info{service_name=\"$app\"}) or vector(0)",
102
+ "instant": true,
103
+ "range": false,
104
+ "refId": "A"
105
+ }
106
+ ]
107
+ },
108
+ {
109
+ "type": "stat",
110
+ "transparent": false,
111
+ "repeatDirection": "h",
112
+ "options": {
113
+ "graphMode": "area",
114
+ "colorMode": "value",
115
+ "justifyMode": "auto",
116
+ "textMode": "name",
117
+ "wideLayout": true,
118
+ "showPercentChange": false,
119
+ "reduceOptions": {
120
+ "calcs": []
121
+ },
122
+ "percentChangeColorMode": "standard",
123
+ "orientation": "auto"
124
+ },
125
+ "id": 2,
126
+ "title": "Version",
127
+ "datasource": {
128
+ "type": "prometheus",
129
+ "uid": "prometheus"
130
+ },
131
+ "gridPos": {
132
+ "h": 4,
133
+ "w": 6,
134
+ "x": 6,
135
+ "y": 1
136
+ },
137
+ "targets": [
138
+ {
139
+ "expr": "max by (service_version) (target_info{service_name=\"$app\"})",
140
+ "legendFormat": "{{service_version}}",
141
+ "instant": true,
142
+ "range": false,
143
+ "refId": "A"
144
+ }
145
+ ]
146
+ },
147
+ {
148
+ "type": "stat",
149
+ "transparent": false,
150
+ "repeatDirection": "h",
151
+ "options": {
152
+ "graphMode": "area",
153
+ "colorMode": "value",
154
+ "justifyMode": "auto",
155
+ "textMode": "auto",
156
+ "wideLayout": true,
157
+ "showPercentChange": false,
158
+ "reduceOptions": {
159
+ "calcs": []
160
+ },
161
+ "percentChangeColorMode": "standard",
162
+ "orientation": "auto"
163
+ },
164
+ "id": 3,
165
+ "title": "Requests per second",
166
+ "datasource": {
167
+ "type": "prometheus",
168
+ "uid": "prometheus"
169
+ },
170
+ "fieldConfig": {
171
+ "defaults": {
172
+ "unit": "reqps"
173
+ },
174
+ "overrides": []
175
+ },
176
+ "gridPos": {
177
+ "h": 4,
178
+ "w": 6,
179
+ "x": 12,
180
+ "y": 1
181
+ },
182
+ "targets": [
183
+ {
184
+ "expr": "sum(rate(http_server_request_duration_seconds_count{service_name=\"$app\"}[5m])) or vector(0)",
185
+ "instant": true,
186
+ "range": false,
187
+ "refId": "A"
188
+ }
189
+ ]
190
+ },
191
+ {
192
+ "type": "stat",
193
+ "transparent": false,
194
+ "repeatDirection": "h",
195
+ "options": {
196
+ "graphMode": "area",
197
+ "colorMode": "value",
198
+ "justifyMode": "auto",
199
+ "textMode": "auto",
200
+ "wideLayout": true,
201
+ "showPercentChange": false,
202
+ "reduceOptions": {
203
+ "calcs": []
204
+ },
205
+ "percentChangeColorMode": "standard",
206
+ "orientation": "auto"
207
+ },
208
+ "id": 4,
209
+ "title": "Share of requests that fail",
210
+ "datasource": {
211
+ "type": "prometheus",
212
+ "uid": "prometheus"
213
+ },
214
+ "fieldConfig": {
215
+ "defaults": {
216
+ "unit": "percentunit"
217
+ },
218
+ "overrides": []
219
+ },
220
+ "gridPos": {
221
+ "h": 4,
222
+ "w": 6,
223
+ "x": 18,
224
+ "y": 1
225
+ },
226
+ "targets": [
227
+ {
228
+ "expr": "(sum(rate(http_server_request_duration_seconds_count{service_name=\"$app\", http_response_status_code=~\"5..\"}[5m])) or vector(0)) / (sum(rate(http_server_request_duration_seconds_count{service_name=\"$app\"}[5m])) > 0)",
229
+ "instant": true,
230
+ "range": false,
231
+ "refId": "A"
232
+ }
233
+ ]
234
+ },
235
+ {
236
+ "type": "stat",
237
+ "transparent": false,
238
+ "repeatDirection": "h",
239
+ "options": {
240
+ "graphMode": "area",
241
+ "colorMode": "value",
242
+ "justifyMode": "auto",
243
+ "textMode": "auto",
244
+ "wideLayout": true,
245
+ "showPercentChange": false,
246
+ "reduceOptions": {
247
+ "calcs": []
248
+ },
249
+ "percentChangeColorMode": "standard",
250
+ "orientation": "auto"
251
+ },
252
+ "id": 5,
253
+ "title": "Response time of the slowest 5%",
254
+ "datasource": {
255
+ "type": "prometheus",
256
+ "uid": "prometheus"
257
+ },
258
+ "fieldConfig": {
259
+ "defaults": {
260
+ "unit": "s"
261
+ },
262
+ "overrides": []
263
+ },
264
+ "gridPos": {
265
+ "h": 4,
266
+ "w": 6,
267
+ "x": 0,
268
+ "y": 5
269
+ },
270
+ "targets": [
271
+ {
272
+ "expr": "histogram_quantile(0.95, sum by (le) (rate(http_server_request_duration_seconds_bucket{service_name=\"$app\"}[5m])))",
273
+ "instant": true,
274
+ "range": false,
275
+ "refId": "A"
276
+ }
277
+ ]
278
+ },
279
+ {
280
+ "type": "row",
281
+ "collapsed": false,
282
+ "id": 0,
283
+ "panels": [],
284
+ "title": "Requests",
285
+ "gridPos": {
286
+ "x": 0,
287
+ "y": 9,
288
+ "h": 1,
289
+ "w": 24
290
+ }
291
+ },
292
+ {
293
+ "type": "timeseries",
294
+ "transparent": false,
295
+ "repeatDirection": "h",
296
+ "options": {
297
+ "legend": {
298
+ "displayMode": "list",
299
+ "placement": "bottom",
300
+ "showLegend": false,
301
+ "calcs": []
302
+ },
303
+ "tooltip": {
304
+ "mode": "single",
305
+ "sort": "asc"
306
+ }
307
+ },
308
+ "fieldConfig": {
309
+ "defaults": {
310
+ "custom": {},
311
+ "unit": "reqps"
312
+ },
313
+ "overrides": []
314
+ },
315
+ "id": 6,
316
+ "title": "Requests by route",
317
+ "datasource": {
318
+ "type": "prometheus",
319
+ "uid": "prometheus"
320
+ },
321
+ "gridPos": {
322
+ "h": 8,
323
+ "w": 12,
324
+ "x": 0,
325
+ "y": 10
326
+ },
327
+ "targets": [
328
+ {
329
+ "expr": "sum by (http_route) (rate(http_server_request_duration_seconds_count{service_name=\"$app\"}[$__rate_interval]))",
330
+ "legendFormat": "{{http_route}}",
331
+ "refId": "A"
332
+ }
333
+ ]
334
+ },
335
+ {
336
+ "type": "timeseries",
337
+ "transparent": false,
338
+ "repeatDirection": "h",
339
+ "options": {
340
+ "legend": {
341
+ "displayMode": "list",
342
+ "placement": "bottom",
343
+ "showLegend": false,
344
+ "calcs": []
345
+ },
346
+ "tooltip": {
347
+ "mode": "single",
348
+ "sort": "asc"
349
+ }
350
+ },
351
+ "fieldConfig": {
352
+ "defaults": {
353
+ "custom": {},
354
+ "unit": "reqps"
355
+ },
356
+ "overrides": []
357
+ },
358
+ "id": 7,
359
+ "title": "Responses by status",
360
+ "datasource": {
361
+ "type": "prometheus",
362
+ "uid": "prometheus"
363
+ },
364
+ "gridPos": {
365
+ "h": 8,
366
+ "w": 12,
367
+ "x": 12,
368
+ "y": 10
369
+ },
370
+ "targets": [
371
+ {
372
+ "expr": "sum by (http_response_status_code) (rate(http_server_request_duration_seconds_count{service_name=\"$app\"}[$__rate_interval]))",
373
+ "legendFormat": "{{http_response_status_code}}",
374
+ "refId": "A"
375
+ }
376
+ ]
377
+ },
378
+ {
379
+ "type": "row",
380
+ "collapsed": false,
381
+ "id": 0,
382
+ "panels": [],
383
+ "title": "Response times",
384
+ "gridPos": {
385
+ "x": 0,
386
+ "y": 18,
387
+ "h": 1,
388
+ "w": 24
389
+ }
390
+ },
391
+ {
392
+ "type": "timeseries",
393
+ "transparent": false,
394
+ "repeatDirection": "h",
395
+ "options": {
396
+ "legend": {
397
+ "displayMode": "list",
398
+ "placement": "bottom",
399
+ "showLegend": false,
400
+ "calcs": []
401
+ },
402
+ "tooltip": {
403
+ "mode": "single",
404
+ "sort": "asc"
405
+ }
406
+ },
407
+ "fieldConfig": {
408
+ "defaults": {
409
+ "custom": {},
410
+ "unit": "s"
411
+ },
412
+ "overrides": []
413
+ },
414
+ "id": 8,
415
+ "title": "Response time",
416
+ "datasource": {
417
+ "type": "prometheus",
418
+ "uid": "prometheus"
419
+ },
420
+ "gridPos": {
421
+ "h": 8,
422
+ "w": 12,
423
+ "x": 0,
424
+ "y": 19
425
+ },
426
+ "targets": [
427
+ {
428
+ "expr": "histogram_quantile(0.5, sum by (le) (rate(http_server_request_duration_seconds_bucket{service_name=\"$app\"}[$__rate_interval])))",
429
+ "legendFormat": "half of the requests",
430
+ "refId": "A"
431
+ },
432
+ {
433
+ "expr": "histogram_quantile(0.95, sum by (le) (rate(http_server_request_duration_seconds_bucket{service_name=\"$app\"}[$__rate_interval])))",
434
+ "legendFormat": "the slowest 5%",
435
+ "refId": "B"
436
+ },
437
+ {
438
+ "expr": "histogram_quantile(0.99, sum by (le) (rate(http_server_request_duration_seconds_bucket{service_name=\"$app\"}[$__rate_interval])))",
439
+ "legendFormat": "the slowest 1%",
440
+ "refId": "C"
441
+ }
442
+ ]
443
+ },
444
+ {
445
+ "type": "timeseries",
446
+ "transparent": false,
447
+ "repeatDirection": "h",
448
+ "options": {
449
+ "legend": {
450
+ "displayMode": "list",
451
+ "placement": "bottom",
452
+ "showLegend": false,
453
+ "calcs": []
454
+ },
455
+ "tooltip": {
456
+ "mode": "single",
457
+ "sort": "asc"
458
+ }
459
+ },
460
+ "fieldConfig": {
461
+ "defaults": {
462
+ "custom": {},
463
+ "unit": "s"
464
+ },
465
+ "overrides": []
466
+ },
467
+ "id": 9,
468
+ "title": "Response time of the slowest 5%, by route",
469
+ "datasource": {
470
+ "type": "prometheus",
471
+ "uid": "prometheus"
472
+ },
473
+ "gridPos": {
474
+ "h": 8,
475
+ "w": 12,
476
+ "x": 12,
477
+ "y": 19
478
+ },
479
+ "targets": [
480
+ {
481
+ "expr": "histogram_quantile(0.95, sum by (le, http_route) (rate(http_server_request_duration_seconds_bucket{service_name=\"$app\"}[$__rate_interval])))",
482
+ "legendFormat": "{{http_route}}",
483
+ "refId": "A"
484
+ }
485
+ ]
486
+ },
487
+ {
488
+ "type": "row",
489
+ "collapsed": false,
490
+ "id": 0,
491
+ "panels": [],
492
+ "title": "Logs and events",
493
+ "gridPos": {
494
+ "x": 0,
495
+ "y": 27,
496
+ "h": 1,
497
+ "w": 24
498
+ }
499
+ },
500
+ {
501
+ "type": "timeseries",
502
+ "transparent": false,
503
+ "repeatDirection": "h",
504
+ "options": {
505
+ "legend": {
506
+ "displayMode": "list",
507
+ "placement": "bottom",
508
+ "showLegend": false,
509
+ "calcs": []
510
+ },
511
+ "tooltip": {
512
+ "mode": "single",
513
+ "sort": "asc"
514
+ }
515
+ },
516
+ "fieldConfig": {
517
+ "defaults": {
518
+ "custom": {},
519
+ "unit": "short"
520
+ },
521
+ "overrides": []
522
+ },
523
+ "id": 10,
524
+ "title": "Log lines by level",
525
+ "datasource": {
526
+ "type": "loki",
527
+ "uid": "loki"
528
+ },
529
+ "gridPos": {
530
+ "h": 8,
531
+ "w": 12,
532
+ "x": 0,
533
+ "y": 28
534
+ },
535
+ "targets": [
536
+ {
537
+ "expr": "sum by (level) (count_over_time({service_name=\"$app\"} | json | level != \"\" [$__auto]))",
538
+ "legendFormat": "{{level}}",
539
+ "refId": "A"
540
+ }
541
+ ]
542
+ },
543
+ {
544
+ "type": "timeseries",
545
+ "transparent": false,
546
+ "repeatDirection": "h",
547
+ "options": {
548
+ "legend": {
549
+ "displayMode": "list",
550
+ "placement": "bottom",
551
+ "showLegend": false,
552
+ "calcs": []
553
+ },
554
+ "tooltip": {
555
+ "mode": "single",
556
+ "sort": "asc"
557
+ }
558
+ },
559
+ "fieldConfig": {
560
+ "defaults": {
561
+ "custom": {},
562
+ "unit": "short"
563
+ },
564
+ "overrides": []
565
+ },
566
+ "id": 11,
567
+ "title": "Events",
568
+ "datasource": {
569
+ "type": "loki",
570
+ "uid": "loki"
571
+ },
572
+ "gridPos": {
573
+ "h": 8,
574
+ "w": 12,
575
+ "x": 12,
576
+ "y": 28
577
+ },
578
+ "targets": [
579
+ {
580
+ "expr": "sum by (event) (count_over_time({service_name=\"$app\"} | json | event != \"\" [$__auto]))",
581
+ "legendFormat": "{{event}}",
582
+ "refId": "A"
583
+ }
584
+ ]
585
+ },
586
+ {
587
+ "type": "logs",
588
+ "transparent": false,
589
+ "repeatDirection": "h",
590
+ "options": {
591
+ "showLabels": false,
592
+ "showCommonLabels": false,
593
+ "showTime": false,
594
+ "showLogContextToggle": false,
595
+ "wrapLogMessage": false,
596
+ "prettifyLogMessage": false,
597
+ "enableLogDetails": false,
598
+ "sortOrder": "Descending",
599
+ "dedupStrategy": "none"
600
+ },
601
+ "id": 12,
602
+ "title": "Errors and warnings",
603
+ "datasource": {
604
+ "type": "loki",
605
+ "uid": "loki"
606
+ },
607
+ "gridPos": {
608
+ "h": 10,
609
+ "w": 24,
610
+ "x": 0,
611
+ "y": 36
612
+ },
613
+ "targets": [
614
+ {
615
+ "expr": "{service_name=\"$app\"} | json | level=~\"error|warn\"",
616
+ "maxLines": 200,
617
+ "refId": "A"
618
+ }
619
+ ]
620
+ }
621
+ ]
622
+ }
623
+ }