@cloudcare/guance-front-tools 1.0.12 → 1.0.13

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.
Files changed (39) hide show
  1. package/guance-all-charts.json +3415 -0
  2. package/lib/cjs/generated/dashboardCharts.d.ts +54 -13
  3. package/lib/cjs/scripts/grafana-covert-to-guance-core.d.ts +1 -1
  4. package/lib/cjs/scripts/grafana-covert-to-guance-core.js +5 -289
  5. package/lib/esm/generated/dashboardCharts.d.ts +54 -13
  6. package/lib/esm/scripts/grafana-covert-to-guance-core.d.ts +1 -1
  7. package/lib/esm/scripts/grafana-covert-to-guance-core.js +5 -289
  8. package/lib/example/grafana2.json +878 -0
  9. package/lib/example/guance-dahs-3.json +348 -0
  10. package/lib/scripts/grafana-covert-to-guance-core.js +5 -286
  11. package/lib/scripts/grafana-covert-to-guance-core.ts +12 -326
  12. package/lib/scripts/grafana-covert-to-guance.js +52 -29
  13. package/lib/scripts/grafana-covert-to-guance.ts +60 -32
  14. package/package.json +4 -3
  15. package/schemas/charts/chart-schema.json +8 -5
  16. package/schemas/charts/common/chart-link-item-schema.json +48 -0
  17. package/schemas/charts/common/chart-links-schema.json +9 -0
  18. package/schemas/charts/common/common-chart-types-schema.json +3 -1
  19. package/schemas/charts/dashboard-schema.json +11 -4
  20. package/schemas/charts/query/query-item-schema.json +19 -1
  21. package/schemas/charts/settings/settings-time-schema.json +1 -5
  22. package/schemas/charts/settings/settings-unit-items-schema.json +3 -1
  23. package/schemas/charts/settings/settings-units-schema.json +2 -3
  24. package/scripts/validate-file.mjs +57 -0
  25. package/skills/grafana-to-guance-dashboard/SKILL.md +102 -0
  26. package/skills/grafana-to-guance-dashboard/agents/openai.yaml +4 -0
  27. package/skills/grafana-to-guance-dashboard/references/converter-notes.md +134 -0
  28. package/skills/grafana-to-guance-dashboard/scripts/convert-grafana-dashboard.mjs +1899 -0
  29. package/test/cli.test.mjs +316 -0
  30. package/test-output/grafana2.cli.guance.json +1029 -0
  31. package/test-output/grafana2.guance.json +1029 -0
  32. package/test-output/grafana2.keep-meta.guance.json +1384 -0
  33. package/test-output/pod.guance.json +2153 -0
  34. package/test-output/skill-test2-enhanced.guance.json +21596 -0
  35. package/test-output/skill-test2-validated.guance.json +11610 -0
  36. package/test-output/skill-test2.guance.json +11610 -0
  37. package/test-output/test.guance.json +1086 -0
  38. package/test-output/test2.guance.guance-promql.json +23212 -0
  39. package/test-output/test2.guance.json +17554 -0
@@ -0,0 +1,1086 @@
1
+ {
2
+ "title": "Kafka Overview",
3
+ "description": "Kafka resource usage and consumer lag overview\r\n\r\nImproved over dashboard: 762.\r\n\r\nThis requires kafka-exporter for consumer group level metrics.",
4
+ "tags": [
5
+ "Kafka"
6
+ ],
7
+ "uid": "i8HLvrkiz1",
8
+ "main": {
9
+ "vars": [
10
+ {
11
+ "name": "Topic",
12
+ "seq": 0,
13
+ "code": "topic_name",
14
+ "hide": 1,
15
+ "multiple": false,
16
+ "includeStar": true,
17
+ "valueSort": "desc",
18
+ "extend": {
19
+ "originalType": "query",
20
+ "starMeaning": "*",
21
+ "refresh": 1,
22
+ "skipUrlSync": false,
23
+ "sort": 0
24
+ },
25
+ "datasource": "dataflux",
26
+ "type": "QUERY",
27
+ "definition": {
28
+ "tag": "",
29
+ "field": "",
30
+ "value": "label_values(kafka_consumergroup_lag, topic)",
31
+ "metric": "kafka_consumergroup_lag",
32
+ "object": "",
33
+ "defaultVal": {
34
+ "label": "all values",
35
+ "value": "__all__"
36
+ }
37
+ }
38
+ },
39
+ {
40
+ "name": "Consumer Group",
41
+ "seq": 1,
42
+ "code": "group_id",
43
+ "hide": 1,
44
+ "multiple": false,
45
+ "includeStar": true,
46
+ "valueSort": "desc",
47
+ "extend": {
48
+ "originalType": "query",
49
+ "starMeaning": "*",
50
+ "refresh": 1,
51
+ "skipUrlSync": false,
52
+ "sort": 5
53
+ },
54
+ "datasource": "dataflux",
55
+ "type": "QUERY",
56
+ "definition": {
57
+ "tag": "",
58
+ "field": "",
59
+ "value": "label_values(kafka_consumergroup_lag{topic=\"#{topic_name}\"}, consumergroup)",
60
+ "metric": "kafka_consumergroup_lag{topic=\"#{topic_name}\"}",
61
+ "object": "",
62
+ "defaultVal": {
63
+ "label": "*",
64
+ "value": "*"
65
+ }
66
+ }
67
+ },
68
+ {
69
+ "name": "namespace",
70
+ "seq": 2,
71
+ "code": "namespace",
72
+ "hide": 0,
73
+ "multiple": false,
74
+ "includeStar": false,
75
+ "valueSort": "desc",
76
+ "extend": {
77
+ "originalType": "query",
78
+ "refresh": 1,
79
+ "skipUrlSync": false,
80
+ "sort": 0
81
+ },
82
+ "datasource": "dataflux",
83
+ "type": "QUERY",
84
+ "definition": {
85
+ "tag": "",
86
+ "field": "",
87
+ "value": "label_values(kube_pod_info, namespace)",
88
+ "metric": "kube_pod_info",
89
+ "object": "",
90
+ "defaultVal": {
91
+ "label": "ekb-mics",
92
+ "value": "ekb-mics"
93
+ }
94
+ }
95
+ }
96
+ ],
97
+ "charts": [
98
+ {
99
+ "name": "Kafka log size by topic",
100
+ "type": "sequence",
101
+ "group": {
102
+ "name": null
103
+ },
104
+ "pos": {
105
+ "x": 0,
106
+ "y": 2.4,
107
+ "w": 13,
108
+ "h": 11.5
109
+ },
110
+ "extend": {
111
+ "settings": {
112
+ "showTitle": true,
113
+ "titleDesc": "",
114
+ "isSampling": true,
115
+ "changeWorkspace": false,
116
+ "showFieldMapping": false,
117
+ "openThousandsSeparator": true,
118
+ "precision": "2",
119
+ "timeInterval": "auto",
120
+ "fixedTime": "",
121
+ "maxPointCount": null,
122
+ "showLegend": true,
123
+ "legendPostion": "none",
124
+ "legendValues": [
125
+ "last"
126
+ ],
127
+ "showLine": true,
128
+ "lineType": "linear",
129
+ "connectNulls": true,
130
+ "openStack": false,
131
+ "stackType": "time",
132
+ "chartType": "line",
133
+ "isTimeInterval": true,
134
+ "xAxisShowType": "time",
135
+ "unitType": "global",
136
+ "globalUnit": [
137
+ "digital",
138
+ "B"
139
+ ],
140
+ "alias": [
141
+ {
142
+ "alias": "{{ $namespace }}-{{topic}}",
143
+ "key": "A",
144
+ "name": "A"
145
+ }
146
+ ],
147
+ "mainMeasurementQueryCode": "A",
148
+ "extend": {
149
+ "appearance": {
150
+ "lineWidth": 1,
151
+ "fillOpacity": 10,
152
+ "pointMode": "never"
153
+ }
154
+ }
155
+ },
156
+ "sourcePanelType": "graph",
157
+ "sourcePanelId": 22,
158
+ "pluginVersion": "8.1.1",
159
+ "grafana": {
160
+ "options": {
161
+ "alertThreshold": true
162
+ },
163
+ "repeat": null,
164
+ "datasource": "prometheus"
165
+ }
166
+ },
167
+ "queries": [
168
+ {
169
+ "name": "{{ $namespace }}-{{topic}}",
170
+ "type": "sequence",
171
+ "qtype": "promql",
172
+ "datasource": "dataflux",
173
+ "disabled": false,
174
+ "query": {
175
+ "q": "sum by(topic) (kafka_log_log_size{namespace=~\"#{namespace}\"})",
176
+ "code": "A",
177
+ "type": "promql",
178
+ "promqlCode": 1,
179
+ "alias": "{{ $namespace }}-{{topic}}"
180
+ },
181
+ "extend": {
182
+ "refId": "A"
183
+ }
184
+ }
185
+ ]
186
+ },
187
+ {
188
+ "name": "Kafka log size by broker (disk space utilization)",
189
+ "type": "sequence",
190
+ "group": {
191
+ "name": null
192
+ },
193
+ "pos": {
194
+ "x": 13,
195
+ "y": 2.4,
196
+ "w": 11,
197
+ "h": 11.5
198
+ },
199
+ "extend": {
200
+ "settings": {
201
+ "showTitle": true,
202
+ "titleDesc": "",
203
+ "isSampling": true,
204
+ "changeWorkspace": false,
205
+ "showFieldMapping": false,
206
+ "openThousandsSeparator": true,
207
+ "precision": "2",
208
+ "timeInterval": "auto",
209
+ "fixedTime": "",
210
+ "maxPointCount": null,
211
+ "showLegend": true,
212
+ "legendPostion": "none",
213
+ "legendValues": [
214
+ "last"
215
+ ],
216
+ "showLine": true,
217
+ "lineType": "linear",
218
+ "connectNulls": true,
219
+ "openStack": false,
220
+ "stackType": "time",
221
+ "chartType": "line",
222
+ "isTimeInterval": true,
223
+ "xAxisShowType": "time",
224
+ "unitType": "global",
225
+ "globalUnit": [
226
+ "digital",
227
+ "B"
228
+ ],
229
+ "alias": [
230
+ {
231
+ "alias": "{{ $namespace }}-{{pod}}",
232
+ "key": "A",
233
+ "name": "A"
234
+ }
235
+ ],
236
+ "mainMeasurementQueryCode": "A",
237
+ "extend": {
238
+ "appearance": {
239
+ "lineWidth": 1,
240
+ "fillOpacity": 10,
241
+ "pointMode": "never"
242
+ }
243
+ }
244
+ },
245
+ "sourcePanelType": "graph",
246
+ "sourcePanelId": 20,
247
+ "pluginVersion": "8.1.1",
248
+ "grafana": {
249
+ "options": {
250
+ "alertThreshold": true
251
+ },
252
+ "datasource": "prometheus"
253
+ }
254
+ },
255
+ "queries": [
256
+ {
257
+ "name": "{{ $namespace }}-{{pod}}",
258
+ "type": "sequence",
259
+ "qtype": "promql",
260
+ "datasource": "dataflux",
261
+ "disabled": false,
262
+ "query": {
263
+ "q": "sum by(pod) (kafka_log_log_size{namespace=~\"#{namespace}\"})",
264
+ "code": "A",
265
+ "type": "promql",
266
+ "promqlCode": 1,
267
+ "alias": "{{ $namespace }}-{{pod}}"
268
+ },
269
+ "extend": {
270
+ "refId": "A"
271
+ }
272
+ }
273
+ ]
274
+ },
275
+ {
276
+ "name": "CPU Usage",
277
+ "type": "sequence",
278
+ "group": {
279
+ "name": null
280
+ },
281
+ "pos": {
282
+ "x": 0,
283
+ "y": 13.8,
284
+ "w": 8,
285
+ "h": 11.5
286
+ },
287
+ "extend": {
288
+ "settings": {
289
+ "showTitle": true,
290
+ "titleDesc": "",
291
+ "isSampling": true,
292
+ "changeWorkspace": false,
293
+ "showFieldMapping": false,
294
+ "openThousandsSeparator": true,
295
+ "precision": "2",
296
+ "timeInterval": "auto",
297
+ "fixedTime": "",
298
+ "maxPointCount": null,
299
+ "showLegend": true,
300
+ "legendPostion": "none",
301
+ "showLine": true,
302
+ "lineType": "linear",
303
+ "connectNulls": true,
304
+ "openStack": false,
305
+ "stackType": "time",
306
+ "chartType": "line",
307
+ "isTimeInterval": true,
308
+ "xAxisShowType": "time",
309
+ "unitType": "global",
310
+ "globalUnit": [
311
+ "custom",
312
+ "short"
313
+ ],
314
+ "alias": [
315
+ {
316
+ "alias": "{{$namespace}}-{{app}}",
317
+ "key": "A",
318
+ "name": "A"
319
+ }
320
+ ],
321
+ "mainMeasurementQueryCode": "A",
322
+ "extend": {
323
+ "appearance": {
324
+ "lineWidth": 2,
325
+ "fillOpacity": 10,
326
+ "pointMode": "never"
327
+ }
328
+ }
329
+ },
330
+ "sourcePanelType": "graph",
331
+ "sourcePanelId": 1,
332
+ "pluginVersion": "8.1.1",
333
+ "grafana": {
334
+ "options": {
335
+ "alertThreshold": true
336
+ },
337
+ "datasource": "prometheus"
338
+ }
339
+ },
340
+ "queries": [
341
+ {
342
+ "name": "{{$namespace}}-{{app}}",
343
+ "type": "sequence",
344
+ "qtype": "promql",
345
+ "datasource": "dataflux",
346
+ "disabled": false,
347
+ "query": {
348
+ "q": "rate(process_cpu_seconds_total{app=\"kafka\",namespace=~\"#{namespace}\"}[1m])",
349
+ "code": "A",
350
+ "type": "promql",
351
+ "promqlCode": 1,
352
+ "alias": "{{$namespace}}-{{app}}"
353
+ },
354
+ "extend": {
355
+ "refId": "A"
356
+ }
357
+ }
358
+ ]
359
+ },
360
+ {
361
+ "name": "JVM Memory Used",
362
+ "type": "sequence",
363
+ "group": {
364
+ "name": null
365
+ },
366
+ "pos": {
367
+ "x": 8,
368
+ "y": 13.8,
369
+ "w": 8,
370
+ "h": 11.5
371
+ },
372
+ "extend": {
373
+ "settings": {
374
+ "showTitle": true,
375
+ "titleDesc": "",
376
+ "isSampling": true,
377
+ "changeWorkspace": false,
378
+ "showFieldMapping": false,
379
+ "openThousandsSeparator": true,
380
+ "precision": "2",
381
+ "timeInterval": "auto",
382
+ "fixedTime": "",
383
+ "maxPointCount": null,
384
+ "showLegend": true,
385
+ "legendPostion": "none",
386
+ "showLine": true,
387
+ "lineType": "linear",
388
+ "connectNulls": true,
389
+ "openStack": false,
390
+ "stackType": "time",
391
+ "chartType": "line",
392
+ "isTimeInterval": true,
393
+ "xAxisShowType": "time",
394
+ "unitType": "global",
395
+ "globalUnit": [
396
+ "digital",
397
+ "B"
398
+ ],
399
+ "alias": [
400
+ {
401
+ "alias": "jvm : {{namespace}}-{{pod}}",
402
+ "key": "A",
403
+ "name": "A"
404
+ },
405
+ {
406
+ "alias": "pod : {{$namespace}}-{{pod_name}}",
407
+ "key": "B",
408
+ "name": "B"
409
+ }
410
+ ],
411
+ "mainMeasurementQueryCode": "A",
412
+ "extend": {
413
+ "appearance": {
414
+ "lineWidth": 2,
415
+ "fillOpacity": 10,
416
+ "pointMode": "never"
417
+ }
418
+ }
419
+ },
420
+ "sourcePanelType": "graph",
421
+ "sourcePanelId": 2,
422
+ "pluginVersion": "8.1.1",
423
+ "grafana": {
424
+ "options": {
425
+ "alertThreshold": true
426
+ },
427
+ "datasource": "prometheus"
428
+ }
429
+ },
430
+ "queries": [
431
+ {
432
+ "name": "jvm : {{namespace}}-{{pod}}",
433
+ "type": "sequence",
434
+ "qtype": "promql",
435
+ "datasource": "dataflux",
436
+ "disabled": false,
437
+ "query": {
438
+ "q": "sum without(area)(jvm_memory_bytes_used{app=\"kafka\",namespace=~\"#{namespace}\"})",
439
+ "code": "A",
440
+ "type": "promql",
441
+ "promqlCode": 1,
442
+ "alias": "jvm : {{namespace}}-{{pod}}"
443
+ },
444
+ "extend": {
445
+ "refId": "A"
446
+ }
447
+ },
448
+ {
449
+ "name": "pod : {{$namespace}}-{{pod_name}}",
450
+ "type": "sequence",
451
+ "qtype": "promql",
452
+ "datasource": "dataflux",
453
+ "disabled": false,
454
+ "query": {
455
+ "q": "sum by (pod_name)(container_memory_usage_bytes{container_name=\"kafka\",namespace=~\"#{namespace}\"}) ",
456
+ "code": "B",
457
+ "type": "promql",
458
+ "promqlCode": 2,
459
+ "alias": "pod : {{$namespace}}-{{pod_name}}"
460
+ },
461
+ "extend": {
462
+ "refId": "B"
463
+ }
464
+ }
465
+ ]
466
+ },
467
+ {
468
+ "name": "Time spent in GC",
469
+ "type": "sequence",
470
+ "group": {
471
+ "name": null
472
+ },
473
+ "pos": {
474
+ "x": 16,
475
+ "y": 13.8,
476
+ "w": 8,
477
+ "h": 11.5
478
+ },
479
+ "extend": {
480
+ "settings": {
481
+ "showTitle": true,
482
+ "titleDesc": "",
483
+ "isSampling": true,
484
+ "changeWorkspace": false,
485
+ "showFieldMapping": false,
486
+ "openThousandsSeparator": true,
487
+ "precision": "2",
488
+ "timeInterval": "auto",
489
+ "fixedTime": "",
490
+ "maxPointCount": null,
491
+ "showLegend": true,
492
+ "legendPostion": "none",
493
+ "showLine": true,
494
+ "lineType": "linear",
495
+ "connectNulls": true,
496
+ "openStack": false,
497
+ "stackType": "time",
498
+ "chartType": "line",
499
+ "isTimeInterval": true,
500
+ "xAxisShowType": "time",
501
+ "unitType": "global",
502
+ "globalUnit": [
503
+ "custom",
504
+ "percentunit"
505
+ ],
506
+ "alias": [
507
+ {
508
+ "alias": "{{ namespace }}-{{ pod }}",
509
+ "key": "A",
510
+ "name": "A"
511
+ }
512
+ ],
513
+ "mainMeasurementQueryCode": "A",
514
+ "extend": {
515
+ "appearance": {
516
+ "lineWidth": 2,
517
+ "fillOpacity": 10,
518
+ "pointMode": "never"
519
+ }
520
+ }
521
+ },
522
+ "sourcePanelType": "graph",
523
+ "sourcePanelId": 3,
524
+ "pluginVersion": "8.1.1",
525
+ "grafana": {
526
+ "options": {
527
+ "alertThreshold": true
528
+ },
529
+ "datasource": "prometheus"
530
+ }
531
+ },
532
+ "queries": [
533
+ {
534
+ "name": "{{ namespace }}-{{ pod }}",
535
+ "type": "sequence",
536
+ "qtype": "promql",
537
+ "datasource": "dataflux",
538
+ "disabled": false,
539
+ "query": {
540
+ "q": "sum without(gc)(rate(jvm_gc_collection_seconds_sum{app=\"kafka\",namespace=~\"#{namespace}\"}[5m]))",
541
+ "code": "A",
542
+ "type": "promql",
543
+ "promqlCode": 1,
544
+ "alias": "{{ namespace }}-{{ pod }}"
545
+ },
546
+ "extend": {
547
+ "refId": "A"
548
+ }
549
+ }
550
+ ]
551
+ },
552
+ {
553
+ "name": "Messages In Per Topic",
554
+ "type": "sequence",
555
+ "group": {
556
+ "name": null
557
+ },
558
+ "pos": {
559
+ "x": 0,
560
+ "y": 25.2,
561
+ "w": 8,
562
+ "h": 11.5
563
+ },
564
+ "extend": {
565
+ "settings": {
566
+ "showTitle": true,
567
+ "titleDesc": "",
568
+ "isSampling": true,
569
+ "changeWorkspace": false,
570
+ "showFieldMapping": false,
571
+ "openThousandsSeparator": true,
572
+ "precision": "2",
573
+ "timeInterval": "auto",
574
+ "fixedTime": "",
575
+ "maxPointCount": null,
576
+ "showLegend": false,
577
+ "legendPostion": "none",
578
+ "legendValues": [
579
+ "last",
580
+ "max"
581
+ ],
582
+ "showLine": true,
583
+ "lineType": "linear",
584
+ "connectNulls": true,
585
+ "openStack": false,
586
+ "stackType": "time",
587
+ "chartType": "line",
588
+ "isTimeInterval": true,
589
+ "xAxisShowType": "time",
590
+ "unitType": "global",
591
+ "globalUnit": [
592
+ "custom",
593
+ "short"
594
+ ],
595
+ "alias": [
596
+ {
597
+ "alias": "{{ $namespace }}-{{topic}}",
598
+ "key": "A",
599
+ "name": "A"
600
+ }
601
+ ],
602
+ "mainMeasurementQueryCode": "A",
603
+ "extend": {
604
+ "appearance": {
605
+ "lineWidth": 2,
606
+ "fillOpacity": 10,
607
+ "pointMode": "never"
608
+ }
609
+ }
610
+ },
611
+ "sourcePanelType": "graph",
612
+ "sourcePanelId": 4,
613
+ "pluginVersion": "8.1.1",
614
+ "grafana": {
615
+ "options": {
616
+ "alertThreshold": true
617
+ },
618
+ "datasource": "prometheus"
619
+ }
620
+ },
621
+ "queries": [
622
+ {
623
+ "name": "{{ $namespace }}-{{topic}}",
624
+ "type": "sequence",
625
+ "qtype": "promql",
626
+ "datasource": "dataflux",
627
+ "disabled": false,
628
+ "query": {
629
+ "q": "sum without(instance, pod)(rate(kafka_server_brokertopicmetrics_messagesin_total{app=\"kafka\",topic!=\"\",namespace=~\"#{namespace}\"}[5m]))",
630
+ "code": "A",
631
+ "type": "promql",
632
+ "promqlCode": 1,
633
+ "alias": "{{ $namespace }}-{{topic}}"
634
+ },
635
+ "extend": {
636
+ "refId": "A"
637
+ }
638
+ }
639
+ ]
640
+ },
641
+ {
642
+ "name": "Bytes In Per Topic",
643
+ "type": "sequence",
644
+ "group": {
645
+ "name": null
646
+ },
647
+ "pos": {
648
+ "x": 8,
649
+ "y": 25.2,
650
+ "w": 8,
651
+ "h": 11.5
652
+ },
653
+ "extend": {
654
+ "settings": {
655
+ "showTitle": true,
656
+ "titleDesc": "",
657
+ "isSampling": true,
658
+ "changeWorkspace": false,
659
+ "showFieldMapping": false,
660
+ "openThousandsSeparator": true,
661
+ "precision": "2",
662
+ "timeInterval": "auto",
663
+ "fixedTime": "",
664
+ "maxPointCount": null,
665
+ "showLegend": false,
666
+ "legendPostion": "none",
667
+ "legendValues": [
668
+ "last",
669
+ "max"
670
+ ],
671
+ "showLine": true,
672
+ "lineType": "linear",
673
+ "connectNulls": true,
674
+ "openStack": false,
675
+ "stackType": "time",
676
+ "chartType": "line",
677
+ "isTimeInterval": true,
678
+ "xAxisShowType": "time",
679
+ "unitType": "global",
680
+ "globalUnit": [
681
+ "custom",
682
+ "Bps"
683
+ ],
684
+ "alias": [
685
+ {
686
+ "alias": "{{$namespace}}-{{topic}}",
687
+ "key": "A",
688
+ "name": "A"
689
+ }
690
+ ],
691
+ "mainMeasurementQueryCode": "A",
692
+ "extend": {
693
+ "appearance": {
694
+ "lineWidth": 2,
695
+ "fillOpacity": 10,
696
+ "pointMode": "never"
697
+ }
698
+ }
699
+ },
700
+ "sourcePanelType": "graph",
701
+ "sourcePanelId": 5,
702
+ "pluginVersion": "8.1.1",
703
+ "grafana": {
704
+ "options": {
705
+ "alertThreshold": true
706
+ },
707
+ "datasource": "prometheus"
708
+ }
709
+ },
710
+ "queries": [
711
+ {
712
+ "name": "{{$namespace}}-{{topic}}",
713
+ "type": "sequence",
714
+ "qtype": "promql",
715
+ "datasource": "dataflux",
716
+ "disabled": false,
717
+ "query": {
718
+ "q": "sum without(instance, pod)(rate(kafka_server_brokertopicmetrics_bytesin_total{app=\"kafka\",topic!=\"\",namespace=~\"#{namespace}\"}[5m]))",
719
+ "code": "A",
720
+ "type": "promql",
721
+ "promqlCode": 1,
722
+ "alias": "{{$namespace}}-{{topic}}"
723
+ },
724
+ "extend": {
725
+ "refId": "A"
726
+ }
727
+ }
728
+ ]
729
+ },
730
+ {
731
+ "name": "Bytes Out Per Topic",
732
+ "type": "sequence",
733
+ "group": {
734
+ "name": null
735
+ },
736
+ "pos": {
737
+ "x": 16,
738
+ "y": 25.2,
739
+ "w": 8,
740
+ "h": 11.5
741
+ },
742
+ "extend": {
743
+ "settings": {
744
+ "showTitle": true,
745
+ "titleDesc": "",
746
+ "isSampling": true,
747
+ "changeWorkspace": false,
748
+ "showFieldMapping": false,
749
+ "openThousandsSeparator": true,
750
+ "precision": "2",
751
+ "timeInterval": "auto",
752
+ "fixedTime": "",
753
+ "maxPointCount": null,
754
+ "showLegend": false,
755
+ "legendPostion": "none",
756
+ "legendValues": [
757
+ "last",
758
+ "max"
759
+ ],
760
+ "showLine": true,
761
+ "lineType": "linear",
762
+ "connectNulls": true,
763
+ "openStack": false,
764
+ "stackType": "time",
765
+ "chartType": "line",
766
+ "isTimeInterval": true,
767
+ "xAxisShowType": "time",
768
+ "unitType": "global",
769
+ "globalUnit": [
770
+ "custom",
771
+ "Bps"
772
+ ],
773
+ "alias": [
774
+ {
775
+ "alias": "{{$namespace}}-{{topic}}",
776
+ "key": "A",
777
+ "name": "A"
778
+ }
779
+ ],
780
+ "mainMeasurementQueryCode": "A",
781
+ "extend": {
782
+ "appearance": {
783
+ "lineWidth": 2,
784
+ "fillOpacity": 10,
785
+ "pointMode": "never"
786
+ }
787
+ }
788
+ },
789
+ "sourcePanelType": "graph",
790
+ "sourcePanelId": 6,
791
+ "pluginVersion": "8.1.1",
792
+ "grafana": {
793
+ "options": {
794
+ "alertThreshold": true
795
+ },
796
+ "datasource": "prometheus"
797
+ }
798
+ },
799
+ "queries": [
800
+ {
801
+ "name": "{{$namespace}}-{{topic}}",
802
+ "type": "sequence",
803
+ "qtype": "promql",
804
+ "datasource": "dataflux",
805
+ "disabled": false,
806
+ "query": {
807
+ "q": "sum without(instance, pod)(rate(kafka_server_brokertopicmetrics_bytesout_total{app=\"kafka\",topic!=\"\",namespace=~\"#{namespace}\"}[5m]))",
808
+ "code": "A",
809
+ "type": "promql",
810
+ "promqlCode": 1,
811
+ "alias": "{{$namespace}}-{{topic}}"
812
+ },
813
+ "extend": {
814
+ "refId": "A"
815
+ }
816
+ }
817
+ ]
818
+ },
819
+ {
820
+ "name": "Offline partitions",
821
+ "type": "sequence",
822
+ "group": {
823
+ "name": null
824
+ },
825
+ "pos": {
826
+ "x": 0,
827
+ "y": 36.6,
828
+ "w": 8,
829
+ "h": 11.5
830
+ },
831
+ "extend": {
832
+ "settings": {
833
+ "showTitle": true,
834
+ "titleDesc": "",
835
+ "isSampling": true,
836
+ "changeWorkspace": false,
837
+ "showFieldMapping": false,
838
+ "openThousandsSeparator": true,
839
+ "precision": "2",
840
+ "timeInterval": "auto",
841
+ "fixedTime": "",
842
+ "maxPointCount": null,
843
+ "showLegend": true,
844
+ "legendPostion": "none",
845
+ "legendValues": [
846
+ "last"
847
+ ],
848
+ "showLine": true,
849
+ "lineType": "linear",
850
+ "connectNulls": false,
851
+ "openStack": false,
852
+ "stackType": "time",
853
+ "chartType": "line",
854
+ "isTimeInterval": true,
855
+ "xAxisShowType": "time",
856
+ "unitType": "global",
857
+ "globalUnit": [
858
+ "custom",
859
+ "short"
860
+ ],
861
+ "alias": [
862
+ {
863
+ "alias": "{{$namespace}}-{{pod}}",
864
+ "key": "A",
865
+ "name": "A"
866
+ }
867
+ ],
868
+ "mainMeasurementQueryCode": "A",
869
+ "extend": {
870
+ "appearance": {
871
+ "lineWidth": 1,
872
+ "fillOpacity": 10,
873
+ "pointMode": "never"
874
+ }
875
+ }
876
+ },
877
+ "sourcePanelType": "graph",
878
+ "sourcePanelId": 18,
879
+ "pluginVersion": "8.1.1",
880
+ "grafana": {
881
+ "options": {
882
+ "alertThreshold": true
883
+ },
884
+ "datasource": "prometheus"
885
+ }
886
+ },
887
+ "queries": [
888
+ {
889
+ "name": "{{$namespace}}-{{pod}}",
890
+ "type": "sequence",
891
+ "qtype": "promql",
892
+ "datasource": "dataflux",
893
+ "disabled": false,
894
+ "query": {
895
+ "q": "kafka_controller_kafkacontroller_offlinepartitionscount{namespace=~\"#{namespace}\"}",
896
+ "code": "A",
897
+ "type": "promql",
898
+ "promqlCode": 1,
899
+ "alias": "{{$namespace}}-{{pod}}"
900
+ },
901
+ "extend": {
902
+ "refId": "A"
903
+ }
904
+ }
905
+ ]
906
+ },
907
+ {
908
+ "name": "Underreplicated partitions by topic",
909
+ "type": "sequence",
910
+ "group": {
911
+ "name": null
912
+ },
913
+ "pos": {
914
+ "x": 8,
915
+ "y": 36.6,
916
+ "w": 8,
917
+ "h": 11.5
918
+ },
919
+ "extend": {
920
+ "settings": {
921
+ "showTitle": true,
922
+ "titleDesc": "",
923
+ "isSampling": true,
924
+ "changeWorkspace": false,
925
+ "showFieldMapping": false,
926
+ "openThousandsSeparator": true,
927
+ "precision": "2",
928
+ "timeInterval": "auto",
929
+ "fixedTime": "",
930
+ "maxPointCount": null,
931
+ "showLegend": true,
932
+ "legendPostion": "none",
933
+ "legendValues": [
934
+ "last"
935
+ ],
936
+ "showLine": true,
937
+ "lineType": "linear",
938
+ "connectNulls": false,
939
+ "openStack": false,
940
+ "stackType": "time",
941
+ "chartType": "line",
942
+ "isTimeInterval": true,
943
+ "xAxisShowType": "time",
944
+ "unitType": "global",
945
+ "globalUnit": [
946
+ "custom",
947
+ "short"
948
+ ],
949
+ "alias": [
950
+ {
951
+ "alias": "{{$namespace}}-{{topic}}",
952
+ "key": "A",
953
+ "name": "A"
954
+ }
955
+ ],
956
+ "mainMeasurementQueryCode": "A",
957
+ "extend": {
958
+ "appearance": {
959
+ "lineWidth": 1,
960
+ "fillOpacity": 10,
961
+ "pointMode": "never"
962
+ }
963
+ }
964
+ },
965
+ "sourcePanelType": "graph",
966
+ "sourcePanelId": 14,
967
+ "pluginVersion": "8.1.1",
968
+ "grafana": {
969
+ "options": {
970
+ "alertThreshold": true
971
+ },
972
+ "datasource": "prometheus"
973
+ }
974
+ },
975
+ "queries": [
976
+ {
977
+ "name": "{{$namespace}}-{{topic}}",
978
+ "type": "sequence",
979
+ "qtype": "promql",
980
+ "datasource": "dataflux",
981
+ "disabled": false,
982
+ "query": {
983
+ "q": "sum by (topic)(kafka_cluster_partition_underreplicated{namespace=~\"#{namespace}\"})",
984
+ "code": "A",
985
+ "type": "promql",
986
+ "promqlCode": 1,
987
+ "alias": "{{$namespace}}-{{topic}}"
988
+ },
989
+ "extend": {
990
+ "refId": "A"
991
+ }
992
+ }
993
+ ]
994
+ },
995
+ {
996
+ "name": "ISR expands by instance",
997
+ "type": "sequence",
998
+ "group": {
999
+ "name": null
1000
+ },
1001
+ "pos": {
1002
+ "x": 16,
1003
+ "y": 36.6,
1004
+ "w": 8,
1005
+ "h": 11.5
1006
+ },
1007
+ "extend": {
1008
+ "settings": {
1009
+ "showTitle": true,
1010
+ "titleDesc": "",
1011
+ "isSampling": true,
1012
+ "changeWorkspace": false,
1013
+ "showFieldMapping": false,
1014
+ "openThousandsSeparator": true,
1015
+ "precision": "2",
1016
+ "timeInterval": "auto",
1017
+ "fixedTime": "",
1018
+ "maxPointCount": null,
1019
+ "showLegend": true,
1020
+ "legendPostion": "none",
1021
+ "legendValues": [
1022
+ "last"
1023
+ ],
1024
+ "showLine": true,
1025
+ "lineType": "linear",
1026
+ "connectNulls": false,
1027
+ "openStack": false,
1028
+ "stackType": "time",
1029
+ "chartType": "line",
1030
+ "isTimeInterval": true,
1031
+ "xAxisShowType": "time",
1032
+ "unitType": "global",
1033
+ "globalUnit": [
1034
+ "custom",
1035
+ "short"
1036
+ ],
1037
+ "alias": [
1038
+ {
1039
+ "alias": "{{$namespace}}",
1040
+ "key": "A",
1041
+ "name": "A"
1042
+ }
1043
+ ],
1044
+ "mainMeasurementQueryCode": "A",
1045
+ "extend": {
1046
+ "appearance": {
1047
+ "lineWidth": 1,
1048
+ "fillOpacity": 10,
1049
+ "pointMode": "never"
1050
+ }
1051
+ }
1052
+ },
1053
+ "sourcePanelType": "graph",
1054
+ "sourcePanelId": 12,
1055
+ "pluginVersion": "8.1.1",
1056
+ "grafana": {
1057
+ "options": {
1058
+ "alertThreshold": true
1059
+ },
1060
+ "datasource": "prometheus"
1061
+ }
1062
+ },
1063
+ "queries": [
1064
+ {
1065
+ "name": "{{$namespace}}",
1066
+ "type": "sequence",
1067
+ "qtype": "promql",
1068
+ "datasource": "dataflux",
1069
+ "disabled": false,
1070
+ "query": {
1071
+ "q": "sum by (kubernetes_pod)(rate(kafka_server_replicamanager_isrexpands_total{namespace=~\"#{namespace}\"}[1m]))",
1072
+ "code": "A",
1073
+ "type": "promql",
1074
+ "promqlCode": 1,
1075
+ "alias": "{{$namespace}}"
1076
+ },
1077
+ "extend": {
1078
+ "refId": "A"
1079
+ }
1080
+ }
1081
+ ]
1082
+ }
1083
+ ],
1084
+ "type": "template"
1085
+ }
1086
+ }