all repos

onasty @ 00d1621a13f2d5cfc18ea9585223b5c0cbc413f6

a one-time notes service

onasty/infra/grafana/dashboards/onasty.json (view raw)

Oleksandr Smirnov Oleksandr Smirnov
olexsmir@gmail.com
chore: add grafana dashboard (#209), 9 months ago
1
{
2
  "annotations": {
3
    "list": [
4
      {
5
        "builtIn": 1,
6
        "datasource": {
7
          "type": "grafana",
8
          "uid": "-- Grafana --"
9
        },
10
        "enable": true,
11
        "hide": true,
12
        "iconColor": "rgba(0, 211, 255, 1)",
13
        "name": "Annotations & Alerts",
14
        "type": "dashboard"
15
      }
16
    ]
17
  },
18
  "editable": true,
19
  "fiscalYearStartMonth": 0,
20
  "graphTooltip": 0,
21
  "links": [],
22
  "panels": [
23
    {
24
      "collapsed": false,
25
      "gridPos": {
26
        "h": 1,
27
        "w": 24,
28
        "x": 0,
29
        "y": 0
30
      },
31
      "id": 2,
32
      "panels": [],
33
      "title": "core",
34
      "type": "row"
35
    },
36
    {
37
      "datasource": {
38
        "type": "prometheus",
39
        "uid": "P1809F7CD0C75ACF3"
40
      },
41
      "fieldConfig": {
42
        "defaults": {
43
          "color": {
44
            "mode": "palette-classic"
45
          },
46
          "custom": {
47
            "fillOpacity": 80,
48
            "gradientMode": "none",
49
            "hideFrom": {
50
              "legend": false,
51
              "tooltip": false,
52
              "viz": false
53
            },
54
            "lineWidth": 1,
55
            "stacking": {
56
              "group": "A",
57
              "mode": "none"
58
            }
59
          },
60
          "mappings": [],
61
          "thresholds": {
62
            "mode": "absolute",
63
            "steps": [
64
              {
65
                "color": "green",
66
                "value": null
67
              },
68
              {
69
                "color": "red",
70
                "value": 80
71
              }
72
            ]
73
          }
74
        },
75
        "overrides": []
76
      },
77
      "gridPos": {
78
        "h": 10,
79
        "w": 10,
80
        "x": 0,
81
        "y": 1
82
      },
83
      "id": 5,
84
      "options": {
85
        "legend": {
86
          "calcs": [],
87
          "displayMode": "list",
88
          "placement": "bottom",
89
          "showLegend": true
90
        }
91
      },
92
      "targets": [
93
        {
94
          "datasource": {
95
            "type": "prometheus",
96
            "uid": "P1809F7CD0C75ACF3"
97
          },
98
          "disableTextWrap": false,
99
          "editorMode": "code",
100
          "expr": "histogram_quantile(\n  0.95,\n  sum by (le, method, uri) (rate(http_request_latency_seconds_bucket[5s]))\n)",
101
          "fullMetaSearch": false,
102
          "includeNullMetadata": true,
103
          "legendFormat": "__auto",
104
          "range": true,
105
          "refId": "95th percentile latency",
106
          "useBackend": false
107
        },
108
        {
109
          "datasource": {
110
            "type": "prometheus",
111
            "uid": "P1809F7CD0C75ACF3"
112
          },
113
          "editorMode": "code",
114
          "exemplar": false,
115
          "expr": "sum by (method, uri) (http_successful_requests_total)",
116
          "format": "heatmap",
117
          "hide": false,
118
          "instant": true,
119
          "interval": "",
120
          "legendFormat": "__auto",
121
          "range": true,
122
          "refId": "successful requests"
123
        },
124
        {
125
          "datasource": {
126
            "type": "prometheus",
127
            "uid": "P1809F7CD0C75ACF3"
128
          },
129
          "editorMode": "code",
130
          "expr": "sum by (method, uri) (http_failed_requests_total)",
131
          "format": "heatmap",
132
          "hide": false,
133
          "instant": true,
134
          "legendFormat": "__auto",
135
          "range": true,
136
          "refId": "failed requests"
137
        }
138
      ],
139
      "title": "http requests latency",
140
      "type": "histogram"
141
    },
142
    {
143
      "datasource": {
144
        "type": "prometheus",
145
        "uid": "P1809F7CD0C75ACF3"
146
      },
147
      "fieldConfig": {
148
        "defaults": {
149
          "color": {
150
            "mode": "thresholds"
151
          },
152
          "mappings": [],
153
          "thresholds": {
154
            "mode": "absolute",
155
            "steps": [
156
              {
157
                "color": "green",
158
                "value": null
159
              }
160
            ]
161
          }
162
        },
163
        "overrides": [
164
          {
165
            "matcher": {
166
              "id": "byFrameRefID",
167
              "options": "failed"
168
            },
169
            "properties": [
170
              {
171
                "id": "color",
172
                "value": {
173
                  "fixedColor": "dark-red",
174
                  "mode": "shades"
175
                }
176
              }
177
            ]
178
          },
179
          {
180
            "matcher": {
181
              "id": "byFrameRefID",
182
              "options": "success"
183
            },
184
            "properties": [
185
              {
186
                "id": "color",
187
                "value": {
188
                  "fixedColor": "dark-green",
189
                  "mode": "shades"
190
                }
191
              }
192
            ]
193
          }
194
        ]
195
      },
196
      "gridPos": {
197
        "h": 10,
198
        "w": 14,
199
        "x": 10,
200
        "y": 1
201
      },
202
      "id": 6,
203
      "options": {
204
        "displayMode": "gradient",
205
        "maxVizHeight": 300,
206
        "minVizHeight": 16,
207
        "minVizWidth": 8,
208
        "namePlacement": "auto",
209
        "orientation": "horizontal",
210
        "reduceOptions": {
211
          "calcs": [
212
            "lastNotNull"
213
          ],
214
          "fields": "",
215
          "values": false
216
        },
217
        "showUnfilled": true,
218
        "sizing": "auto",
219
        "valueMode": "color"
220
      },
221
      "pluginVersion": "11.1.6",
222
      "targets": [
223
        {
224
          "datasource": {
225
            "type": "prometheus",
226
            "uid": "P1809F7CD0C75ACF3"
227
          },
228
          "disableTextWrap": false,
229
          "editorMode": "builder",
230
          "exemplar": false,
231
          "expr": "sum by(method, uri) (http_successful_requests_total)",
232
          "format": "time_series",
233
          "fullMetaSearch": false,
234
          "includeNullMetadata": true,
235
          "instant": false,
236
          "interval": "",
237
          "legendFormat": "{{method}} {{uri}}",
238
          "range": true,
239
          "refId": "success",
240
          "useBackend": false
241
        },
242
        {
243
          "datasource": {
244
            "type": "prometheus",
245
            "uid": "P1809F7CD0C75ACF3"
246
          },
247
          "editorMode": "builder",
248
          "exemplar": false,
249
          "expr": "sum by (method, uri) (http_failed_requests_total)",
250
          "format": "time_series",
251
          "hide": false,
252
          "instant": false,
253
          "legendFormat": "{{method}} {{uri}}",
254
          "range": true,
255
          "refId": "failed"
256
        }
257
      ],
258
      "title": "Successful / Failed Requests",
259
      "type": "bargauge"
260
    },
261
    {
262
      "datasource": {
263
        "type": "loki",
264
        "uid": "P982945308D3682D1"
265
      },
266
      "gridPos": {
267
        "h": 11,
268
        "w": 24,
269
        "x": 0,
270
        "y": 11
271
      },
272
      "id": 1,
273
      "options": {
274
        "dedupStrategy": "none",
275
        "enableLogDetails": true,
276
        "prettifyLogMessage": false,
277
        "showCommonLabels": false,
278
        "showLabels": false,
279
        "showTime": true,
280
        "sortOrder": "Descending",
281
        "wrapLogMessage": false
282
      },
283
      "pluginVersion": "11.1.6",
284
      "targets": [
285
        {
286
          "datasource": {
287
            "type": "loki",
288
            "uid": "P982945308D3682D1"
289
          },
290
          "editorMode": "code",
291
          "expr": "{service_name=\"onasty-core\"}\n|= ``\n| json\n| drop container, container_id, service_name\n| label_format cache_miss=\"{{ if eq .err `redis: nil` }}true{{ end }}\"",
292
          "queryType": "range",
293
          "refId": "A"
294
        }
295
      ],
296
      "title": "Logs",
297
      "type": "logs"
298
    },
299
    {
300
      "datasource": {
301
        "type": "prometheus",
302
        "uid": "P1809F7CD0C75ACF3"
303
      },
304
      "fieldConfig": {
305
        "defaults": {
306
          "color": {
307
            "mode": "palette-classic"
308
          },
309
          "custom": {
310
            "axisBorderShow": false,
311
            "axisCenteredZero": false,
312
            "axisColorMode": "text",
313
            "axisLabel": "",
314
            "axisPlacement": "auto",
315
            "barAlignment": 0,
316
            "drawStyle": "line",
317
            "fillOpacity": 0,
318
            "gradientMode": "none",
319
            "hideFrom": {
320
              "legend": false,
321
              "tooltip": false,
322
              "viz": false
323
            },
324
            "insertNulls": false,
325
            "lineInterpolation": "linear",
326
            "lineWidth": 1,
327
            "pointSize": 5,
328
            "scaleDistribution": {
329
              "type": "linear"
330
            },
331
            "showPoints": "auto",
332
            "spanNulls": false,
333
            "stacking": {
334
              "group": "A",
335
              "mode": "none"
336
            },
337
            "thresholdsStyle": {
338
              "mode": "off"
339
            }
340
          },
341
          "mappings": [],
342
          "thresholds": {
343
            "mode": "absolute",
344
            "steps": [
345
              {
346
                "color": "green",
347
                "value": null
348
              },
349
              {
350
                "color": "red",
351
                "value": 80
352
              }
353
            ]
354
          }
355
        },
356
        "overrides": []
357
      },
358
      "gridPos": {
359
        "h": 8,
360
        "w": 10,
361
        "x": 0,
362
        "y": 22
363
      },
364
      "id": 8,
365
      "options": {
366
        "legend": {
367
          "calcs": [],
368
          "displayMode": "hidden",
369
          "placement": "right",
370
          "showLegend": false
371
        },
372
        "tooltip": {
373
          "mode": "single",
374
          "sort": "none"
375
        }
376
      },
377
      "targets": [
378
        {
379
          "datasource": {
380
            "type": "prometheus",
381
            "uid": "P1809F7CD0C75ACF3"
382
          },
383
          "disableTextWrap": false,
384
          "editorMode": "builder",
385
          "expr": "go_goroutines{job=\"core\"}",
386
          "fullMetaSearch": false,
387
          "includeNullMetadata": true,
388
          "instant": false,
389
          "legendFormat": "__auto",
390
          "range": true,
391
          "refId": "A",
392
          "useBackend": false
393
        }
394
      ],
395
      "title": "goroutines",
396
      "type": "timeseries"
397
    },
398
    {
399
      "datasource": {
400
        "type": "prometheus",
401
        "uid": "P1809F7CD0C75ACF3"
402
      },
403
      "fieldConfig": {
404
        "defaults": {
405
          "color": {
406
            "mode": "palette-classic"
407
          },
408
          "custom": {
409
            "axisBorderShow": false,
410
            "axisCenteredZero": false,
411
            "axisColorMode": "text",
412
            "axisLabel": "",
413
            "axisPlacement": "auto",
414
            "barAlignment": 0,
415
            "drawStyle": "line",
416
            "fillOpacity": 25,
417
            "gradientMode": "none",
418
            "hideFrom": {
419
              "legend": false,
420
              "tooltip": false,
421
              "viz": false
422
            },
423
            "insertNulls": false,
424
            "lineInterpolation": "linear",
425
            "lineWidth": 1,
426
            "pointSize": 5,
427
            "scaleDistribution": {
428
              "type": "linear"
429
            },
430
            "showPoints": "auto",
431
            "spanNulls": false,
432
            "stacking": {
433
              "group": "A",
434
              "mode": "normal"
435
            },
436
            "thresholdsStyle": {
437
              "mode": "off"
438
            }
439
          },
440
          "mappings": [],
441
          "thresholds": {
442
            "mode": "absolute",
443
            "steps": [
444
              {
445
                "color": "green",
446
                "value": null
447
              },
448
              {
449
                "color": "red",
450
                "value": 80
451
              }
452
            ]
453
          }
454
        },
455
        "overrides": []
456
      },
457
      "gridPos": {
458
        "h": 8,
459
        "w": 12,
460
        "x": 10,
461
        "y": 22
462
      },
463
      "id": 9,
464
      "options": {
465
        "legend": {
466
          "calcs": [],
467
          "displayMode": "hidden",
468
          "placement": "right",
469
          "showLegend": false
470
        },
471
        "tooltip": {
472
          "mode": "single",
473
          "sort": "none"
474
        }
475
      },
476
      "targets": [
477
        {
478
          "datasource": {
479
            "type": "prometheus",
480
            "uid": "P1809F7CD0C75ACF3"
481
          },
482
          "disableTextWrap": false,
483
          "editorMode": "builder",
484
          "expr": "go_gc_duration_seconds{job=\"core\"}",
485
          "fullMetaSearch": false,
486
          "includeNullMetadata": true,
487
          "instant": false,
488
          "legendFormat": "__auto",
489
          "range": true,
490
          "refId": "A",
491
          "useBackend": false
492
        }
493
      ],
494
      "title": "GC pause durations",
495
      "type": "timeseries"
496
    },
497
    {
498
      "collapsed": false,
499
      "gridPos": {
500
        "h": 1,
501
        "w": 24,
502
        "x": 0,
503
        "y": 30
504
      },
505
      "id": 3,
506
      "panels": [],
507
      "title": "mailer",
508
      "type": "row"
509
    },
510
    {
511
      "datasource": {
512
        "type": "prometheus",
513
        "uid": "P1809F7CD0C75ACF3"
514
      },
515
      "fieldConfig": {
516
        "defaults": {
517
          "color": {
518
            "mode": "thresholds"
519
          },
520
          "fieldMinMax": true,
521
          "mappings": [],
522
          "max": 100,
523
          "min": 0,
524
          "thresholds": {
525
            "mode": "absolute",
526
            "steps": [
527
              {
528
                "color": "transparent",
529
                "value": null
530
              },
531
              {
532
                "color": "dark-red",
533
                "value": 0
534
              },
535
              {
536
                "color": "#EAB839",
537
                "value": 95
538
              },
539
              {
540
                "color": "dark-green",
541
                "value": 98
542
              }
543
            ]
544
          },
545
          "unit": "percent"
546
        },
547
        "overrides": []
548
      },
549
      "gridPos": {
550
        "h": 8,
551
        "w": 7,
552
        "x": 0,
553
        "y": 31
554
      },
555
      "id": 7,
556
      "options": {
557
        "minVizHeight": 0,
558
        "minVizWidth": 75,
559
        "orientation": "auto",
560
        "reduceOptions": {
561
          "calcs": [
562
            "lastNotNull"
563
          ],
564
          "fields": "",
565
          "limit": 1,
566
          "values": false
567
        },
568
        "showThresholdLabels": false,
569
        "showThresholdMarkers": true,
570
        "sizing": "auto"
571
      },
572
      "pluginVersion": "11.1.6",
573
      "targets": [
574
        {
575
          "datasource": {
576
            "type": "prometheus",
577
            "uid": "P1809F7CD0C75ACF3"
578
          },
579
          "disableTextWrap": false,
580
          "editorMode": "code",
581
          "expr": "100 * sum(mail_sent_total) / clamp_min(sum(mail_sent_total) + sum(mail_failed_total), 1)",
582
          "fullMetaSearch": false,
583
          "hide": false,
584
          "includeNullMetadata": true,
585
          "instant": false,
586
          "legendFormat": "__auto",
587
          "range": true,
588
          "refId": "A",
589
          "useBackend": false
590
        }
591
      ],
592
      "title": "ratio sent/failed emails",
593
      "type": "gauge"
594
    },
595
    {
596
      "datasource": {
597
        "type": "loki",
598
        "uid": "P982945308D3682D1"
599
      },
600
      "gridPos": {
601
        "h": 15,
602
        "w": 17,
603
        "x": 7,
604
        "y": 31
605
      },
606
      "id": 4,
607
      "options": {
608
        "dedupStrategy": "none",
609
        "enableLogDetails": true,
610
        "prettifyLogMessage": false,
611
        "showCommonLabels": false,
612
        "showLabels": false,
613
        "showTime": false,
614
        "sortOrder": "Descending",
615
        "wrapLogMessage": false
616
      },
617
      "targets": [
618
        {
619
          "datasource": {
620
            "type": "loki",
621
            "uid": "P982945308D3682D1"
622
          },
623
          "editorMode": "code",
624
          "expr": "{service_name=\"onasty-mailer\"}\n|= ``\n| json\n| drop container, container_id, service_name\n| label_format cache_miss=\"{{ if eq .err `redis: nil` }}true{{ end }}\"",
625
          "queryType": "range",
626
          "refId": "A"
627
        }
628
      ],
629
      "title": "logs",
630
      "type": "logs"
631
    },
632
    {
633
      "datasource": {
634
        "type": "prometheus",
635
        "uid": "P1809F7CD0C75ACF3"
636
      },
637
      "fieldConfig": {
638
        "defaults": {
639
          "color": {
640
            "mode": "palette-classic"
641
          },
642
          "custom": {
643
            "axisBorderShow": false,
644
            "axisCenteredZero": false,
645
            "axisColorMode": "text",
646
            "axisLabel": "",
647
            "axisPlacement": "auto",
648
            "barAlignment": 0,
649
            "drawStyle": "line",
650
            "fillOpacity": 0,
651
            "gradientMode": "none",
652
            "hideFrom": {
653
              "legend": false,
654
              "tooltip": false,
655
              "viz": false
656
            },
657
            "insertNulls": false,
658
            "lineInterpolation": "linear",
659
            "lineWidth": 1,
660
            "pointSize": 5,
661
            "scaleDistribution": {
662
              "type": "linear"
663
            },
664
            "showPoints": "auto",
665
            "spanNulls": false,
666
            "stacking": {
667
              "group": "A",
668
              "mode": "none"
669
            },
670
            "thresholdsStyle": {
671
              "mode": "off"
672
            }
673
          },
674
          "mappings": [],
675
          "thresholds": {
676
            "mode": "absolute",
677
            "steps": [
678
              {
679
                "color": "green",
680
                "value": null
681
              },
682
              {
683
                "color": "red",
684
                "value": 80
685
              }
686
            ]
687
          }
688
        },
689
        "overrides": []
690
      },
691
      "gridPos": {
692
        "h": 8,
693
        "w": 10,
694
        "x": 0,
695
        "y": 46
696
      },
697
      "id": 10,
698
      "options": {
699
        "legend": {
700
          "calcs": [],
701
          "displayMode": "hidden",
702
          "placement": "right",
703
          "showLegend": false
704
        },
705
        "tooltip": {
706
          "mode": "single",
707
          "sort": "none"
708
        }
709
      },
710
      "targets": [
711
        {
712
          "datasource": {
713
            "type": "prometheus",
714
            "uid": "P1809F7CD0C75ACF3"
715
          },
716
          "disableTextWrap": false,
717
          "editorMode": "builder",
718
          "expr": "go_goroutines{job=\"mailer\"}",
719
          "fullMetaSearch": false,
720
          "includeNullMetadata": true,
721
          "instant": false,
722
          "legendFormat": "__auto",
723
          "range": true,
724
          "refId": "A",
725
          "useBackend": false
726
        }
727
      ],
728
      "title": "goroutines",
729
      "type": "timeseries"
730
    },
731
    {
732
      "datasource": {
733
        "type": "prometheus",
734
        "uid": "P1809F7CD0C75ACF3"
735
      },
736
      "fieldConfig": {
737
        "defaults": {
738
          "color": {
739
            "mode": "palette-classic"
740
          },
741
          "custom": {
742
            "axisBorderShow": false,
743
            "axisCenteredZero": false,
744
            "axisColorMode": "text",
745
            "axisLabel": "",
746
            "axisPlacement": "auto",
747
            "barAlignment": 0,
748
            "drawStyle": "line",
749
            "fillOpacity": 25,
750
            "gradientMode": "none",
751
            "hideFrom": {
752
              "legend": false,
753
              "tooltip": false,
754
              "viz": false
755
            },
756
            "insertNulls": false,
757
            "lineInterpolation": "linear",
758
            "lineWidth": 1,
759
            "pointSize": 5,
760
            "scaleDistribution": {
761
              "type": "linear"
762
            },
763
            "showPoints": "auto",
764
            "spanNulls": false,
765
            "stacking": {
766
              "group": "A",
767
              "mode": "normal"
768
            },
769
            "thresholdsStyle": {
770
              "mode": "off"
771
            }
772
          },
773
          "mappings": [],
774
          "thresholds": {
775
            "mode": "absolute",
776
            "steps": [
777
              {
778
                "color": "green",
779
                "value": null
780
              },
781
              {
782
                "color": "red",
783
                "value": 80
784
              }
785
            ]
786
          }
787
        },
788
        "overrides": []
789
      },
790
      "gridPos": {
791
        "h": 8,
792
        "w": 12,
793
        "x": 10,
794
        "y": 46
795
      },
796
      "id": 11,
797
      "options": {
798
        "legend": {
799
          "calcs": [],
800
          "displayMode": "hidden",
801
          "placement": "right",
802
          "showLegend": false
803
        },
804
        "tooltip": {
805
          "mode": "single",
806
          "sort": "none"
807
        }
808
      },
809
      "targets": [
810
        {
811
          "datasource": {
812
            "type": "prometheus",
813
            "uid": "P1809F7CD0C75ACF3"
814
          },
815
          "disableTextWrap": false,
816
          "editorMode": "builder",
817
          "expr": "go_gc_duration_seconds{job=\"mailer\"}",
818
          "fullMetaSearch": false,
819
          "includeNullMetadata": true,
820
          "instant": false,
821
          "legendFormat": "__auto",
822
          "range": true,
823
          "refId": "A",
824
          "useBackend": false
825
        }
826
      ],
827
      "title": "GC pause durations",
828
      "type": "timeseries"
829
    }
830
  ],
831
  "refresh": "",
832
  "schemaVersion": 39,
833
  "tags": [],
834
  "templating": {
835
    "list": []
836
  },
837
  "time": {
838
    "from": "now-1h",
839
    "to": "now"
840
  },
841
  "timepicker": {},
842
  "timezone": "browser",
843
  "title": "onasty",
844
  "uid": "cewv4oqt6wc8wc",
845
  "version": 1,
846
  "weekStart": ""
847
}