@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,2153 @@
1
+ {
2
+ "title": "项目容器状态",
3
+ "tags": [
4
+ "ops"
5
+ ],
6
+ "uid": "s5ykYvxGk",
7
+ "main": {
8
+ "vars": [
9
+ {
10
+ "name": "namespace",
11
+ "seq": 0,
12
+ "code": "namespace",
13
+ "hide": 0,
14
+ "multiple": false,
15
+ "includeStar": false,
16
+ "valueSort": "desc",
17
+ "extend": {
18
+ "originalType": "query",
19
+ "refresh": 1,
20
+ "skipUrlSync": false,
21
+ "sort": 1
22
+ },
23
+ "datasource": "dataflux",
24
+ "type": "QUERY",
25
+ "definition": {
26
+ "tag": "",
27
+ "field": "",
28
+ "value": "label_values(kube_pod_info, namespace)",
29
+ "metric": "kube_pod_info",
30
+ "object": "",
31
+ "defaultVal": {
32
+ "label": "kube-system",
33
+ "value": "kube-system"
34
+ }
35
+ }
36
+ },
37
+ {
38
+ "name": "workload",
39
+ "seq": 1,
40
+ "code": "workload",
41
+ "hide": 0,
42
+ "multiple": false,
43
+ "includeStar": false,
44
+ "valueSort": "desc",
45
+ "extend": {
46
+ "originalType": "query",
47
+ "refresh": 1,
48
+ "skipUrlSync": false,
49
+ "sort": 0
50
+ },
51
+ "datasource": "dataflux",
52
+ "type": "QUERY",
53
+ "definition": {
54
+ "tag": "",
55
+ "field": "",
56
+ "value": "label_values(kube_deployment_created{namespace=\"#{namespace}\"}, deployment)",
57
+ "metric": "kube_deployment_created{namespace=\"#{namespace}\"}",
58
+ "object": "",
59
+ "defaultVal": {
60
+ "label": "tiller-deploy",
61
+ "value": "tiller-deploy"
62
+ }
63
+ }
64
+ }
65
+ ],
66
+ "charts": [
67
+ {
68
+ "name": "CPU Limit",
69
+ "type": "singlestat",
70
+ "group": {
71
+ "name": null
72
+ },
73
+ "pos": {
74
+ "x": 0,
75
+ "y": 0.5,
76
+ "w": 3,
77
+ "h": 5.8
78
+ },
79
+ "extend": {
80
+ "settings": {
81
+ "showTitle": true,
82
+ "titleDesc": "",
83
+ "isSampling": true,
84
+ "changeWorkspace": false,
85
+ "showFieldMapping": false,
86
+ "openThousandsSeparator": true,
87
+ "precision": "2",
88
+ "timeInterval": "auto",
89
+ "fixedTime": "",
90
+ "maxPointCount": 100,
91
+ "legendPostion": "none",
92
+ "lineType": "linear",
93
+ "connectNulls": true,
94
+ "stackType": "time",
95
+ "chartType": "line",
96
+ "isTimeInterval": false,
97
+ "unitType": "global",
98
+ "globalUnit": [
99
+ "custom",
100
+ "none"
101
+ ],
102
+ "mappings": [
103
+ {
104
+ "originalVal": [
105
+ "null"
106
+ ],
107
+ "operation": "=",
108
+ "mappingVal": "N/A"
109
+ },
110
+ {
111
+ "originalVal": [
112
+ "null",
113
+ "null"
114
+ ],
115
+ "operation": "between",
116
+ "mappingVal": "N/A"
117
+ }
118
+ ],
119
+ "min": 0,
120
+ "max": 100,
121
+ "mainMeasurementQueryCode": "A",
122
+ "showLineAxis": true,
123
+ "extend": {
124
+ "appearance": {
125
+ "textMode": "avg",
126
+ "gaugeMode": "value",
127
+ "thresholdMarkers": true,
128
+ "thresholdLabels": false
129
+ }
130
+ }
131
+ },
132
+ "sourcePanelType": "singlestat",
133
+ "sourcePanelId": 8,
134
+ "grafana": {
135
+ "datasource": "Prometheus"
136
+ }
137
+ },
138
+ "queries": [
139
+ {
140
+ "name": "",
141
+ "type": "singlestat",
142
+ "qtype": "promql",
143
+ "datasource": "dataflux",
144
+ "disabled": false,
145
+ "query": {
146
+ "q": "max(kube_pod_container_resource_limits_cpu_cores{namespace=\"#{namespace}\", pod=~\"#{workload}-[0-9a-z]+-[0-9a-z]+\"})",
147
+ "code": "A",
148
+ "type": "promql",
149
+ "promqlCode": 1,
150
+ "alias": ""
151
+ },
152
+ "extend": {
153
+ "refId": "A"
154
+ }
155
+ }
156
+ ]
157
+ },
158
+ {
159
+ "name": "Memory Limit",
160
+ "type": "singlestat",
161
+ "group": {
162
+ "name": null
163
+ },
164
+ "pos": {
165
+ "x": 3,
166
+ "y": 0.5,
167
+ "w": 3,
168
+ "h": 5.8
169
+ },
170
+ "extend": {
171
+ "settings": {
172
+ "showTitle": true,
173
+ "titleDesc": "",
174
+ "isSampling": true,
175
+ "changeWorkspace": false,
176
+ "showFieldMapping": false,
177
+ "openThousandsSeparator": true,
178
+ "precision": "1",
179
+ "timeInterval": "auto",
180
+ "fixedTime": "",
181
+ "maxPointCount": 100,
182
+ "legendPostion": "none",
183
+ "lineType": "linear",
184
+ "connectNulls": true,
185
+ "stackType": "time",
186
+ "chartType": "line",
187
+ "isTimeInterval": false,
188
+ "unitType": "global",
189
+ "globalUnit": [
190
+ "digital",
191
+ "B"
192
+ ],
193
+ "mappings": [
194
+ {
195
+ "originalVal": [
196
+ "null"
197
+ ],
198
+ "operation": "=",
199
+ "mappingVal": "N/A"
200
+ },
201
+ {
202
+ "originalVal": [
203
+ "null",
204
+ "null"
205
+ ],
206
+ "operation": "between",
207
+ "mappingVal": "N/A"
208
+ }
209
+ ],
210
+ "min": 0,
211
+ "max": 100,
212
+ "mainMeasurementQueryCode": "A",
213
+ "showLineAxis": true,
214
+ "extend": {
215
+ "appearance": {
216
+ "textMode": "avg",
217
+ "gaugeMode": "value",
218
+ "thresholdMarkers": true,
219
+ "thresholdLabels": false
220
+ }
221
+ }
222
+ },
223
+ "sourcePanelType": "singlestat",
224
+ "sourcePanelId": 4,
225
+ "grafana": {
226
+ "datasource": "Prometheus"
227
+ }
228
+ },
229
+ "queries": [
230
+ {
231
+ "name": "",
232
+ "type": "singlestat",
233
+ "qtype": "promql",
234
+ "datasource": "dataflux",
235
+ "disabled": false,
236
+ "query": {
237
+ "q": "max(kube_pod_container_resource_limits_memory_bytes{namespace=\"#{namespace}\", pod=~\"#{workload}-[0-9a-z]+-[0-9a-z]+\"})",
238
+ "code": "A",
239
+ "type": "promql",
240
+ "promqlCode": 1,
241
+ "alias": ""
242
+ },
243
+ "extend": {
244
+ "refId": "A"
245
+ }
246
+ }
247
+ ]
248
+ },
249
+ {
250
+ "name": "最大实例数",
251
+ "type": "singlestat",
252
+ "group": {
253
+ "name": null
254
+ },
255
+ "pos": {
256
+ "x": 6,
257
+ "y": 0.5,
258
+ "w": 3,
259
+ "h": 5.8
260
+ },
261
+ "extend": {
262
+ "settings": {
263
+ "showTitle": true,
264
+ "titleDesc": "",
265
+ "isSampling": true,
266
+ "changeWorkspace": false,
267
+ "showFieldMapping": false,
268
+ "openThousandsSeparator": true,
269
+ "precision": "0",
270
+ "timeInterval": "auto",
271
+ "fixedTime": "",
272
+ "maxPointCount": 100,
273
+ "legendPostion": "none",
274
+ "lineType": "linear",
275
+ "connectNulls": true,
276
+ "stackType": "time",
277
+ "chartType": "line",
278
+ "isTimeInterval": false,
279
+ "unitType": "global",
280
+ "globalUnit": [
281
+ "custom",
282
+ "none"
283
+ ],
284
+ "mappings": [
285
+ {
286
+ "originalVal": [
287
+ "null"
288
+ ],
289
+ "operation": "=",
290
+ "mappingVal": "N/A"
291
+ },
292
+ {
293
+ "originalVal": [
294
+ "null",
295
+ "null"
296
+ ],
297
+ "operation": "between",
298
+ "mappingVal": "N/A"
299
+ }
300
+ ],
301
+ "min": 0,
302
+ "max": 100,
303
+ "mainMeasurementQueryCode": "A",
304
+ "showLineAxis": true,
305
+ "extend": {
306
+ "appearance": {
307
+ "textMode": "avg",
308
+ "gaugeMode": "value",
309
+ "thresholdMarkers": true,
310
+ "thresholdLabels": false
311
+ }
312
+ }
313
+ },
314
+ "sourcePanelType": "singlestat",
315
+ "sourcePanelId": 10,
316
+ "grafana": {
317
+ "datasource": "Prometheus"
318
+ }
319
+ },
320
+ "queries": [
321
+ {
322
+ "name": "",
323
+ "type": "singlestat",
324
+ "qtype": "promql",
325
+ "datasource": "dataflux",
326
+ "disabled": false,
327
+ "query": {
328
+ "q": "kube_deployment_spec_replicas{deployment=~\"#{workload}\"}",
329
+ "code": "A",
330
+ "type": "promql",
331
+ "promqlCode": 1,
332
+ "alias": ""
333
+ },
334
+ "extend": {
335
+ "refId": "A"
336
+ }
337
+ }
338
+ ]
339
+ },
340
+ {
341
+ "name": "整体CPU使用率",
342
+ "type": "gauge",
343
+ "group": {
344
+ "name": null
345
+ },
346
+ "pos": {
347
+ "x": 9,
348
+ "y": 0.5,
349
+ "w": 5,
350
+ "h": 15.3
351
+ },
352
+ "extend": {
353
+ "settings": {
354
+ "showTitle": true,
355
+ "titleDesc": "",
356
+ "isSampling": true,
357
+ "changeWorkspace": false,
358
+ "showFieldMapping": false,
359
+ "openThousandsSeparator": true,
360
+ "precision": "0",
361
+ "timeInterval": "auto",
362
+ "fixedTime": "",
363
+ "maxPointCount": null,
364
+ "legendPostion": "none",
365
+ "lineType": "linear",
366
+ "stackType": "time",
367
+ "chartType": "line",
368
+ "isTimeInterval": false,
369
+ "unitType": "global",
370
+ "globalUnit": [
371
+ "custom",
372
+ "percentunit"
373
+ ],
374
+ "levels": [
375
+ {
376
+ "title": "Level 1",
377
+ "value": 0,
378
+ "bgColor": "green"
379
+ },
380
+ {
381
+ "title": "Level 2",
382
+ "value": 0.4,
383
+ "bgColor": "yellow"
384
+ },
385
+ {
386
+ "title": "Level 3",
387
+ "value": 0.7,
388
+ "bgColor": "red"
389
+ }
390
+ ],
391
+ "min": 0,
392
+ "max": 1,
393
+ "direction": "horizontal",
394
+ "mainMeasurementQueryCode": "A",
395
+ "extend": {
396
+ "appearance": {
397
+ "reduceCalcs": [
398
+ "lastNotNull"
399
+ ],
400
+ "reduceValues": false,
401
+ "gaugeMode": "gauge"
402
+ }
403
+ }
404
+ },
405
+ "sourcePanelType": "gauge",
406
+ "sourcePanelId": 18,
407
+ "pluginVersion": "7.5.4",
408
+ "grafana": {
409
+ "fieldConfig": {
410
+ "defaults": {
411
+ "color": {
412
+ "mode": "thresholds"
413
+ },
414
+ "decimals": 0,
415
+ "displayName": "",
416
+ "mappings": [
417
+ {
418
+ "id": 0,
419
+ "op": "=",
420
+ "text": "N/A",
421
+ "type": 1,
422
+ "value": "null"
423
+ }
424
+ ],
425
+ "max": 1,
426
+ "min": 0,
427
+ "thresholds": {
428
+ "mode": "absolute",
429
+ "steps": [
430
+ {
431
+ "color": "green",
432
+ "value": null
433
+ },
434
+ {
435
+ "color": "yellow",
436
+ "value": 0.4
437
+ },
438
+ {
439
+ "color": "red",
440
+ "value": 0.7
441
+ }
442
+ ]
443
+ },
444
+ "unit": "percentunit"
445
+ }
446
+ },
447
+ "options": {
448
+ "orientation": "horizontal",
449
+ "reduceOptions": {
450
+ "calcs": [
451
+ "lastNotNull"
452
+ ],
453
+ "fields": "",
454
+ "values": false
455
+ },
456
+ "showThresholdLabels": false,
457
+ "showThresholdMarkers": true
458
+ },
459
+ "datasource": "Prometheus"
460
+ }
461
+ },
462
+ "queries": [
463
+ {
464
+ "name": "",
465
+ "type": "gauge",
466
+ "qtype": "promql",
467
+ "datasource": "dataflux",
468
+ "disabled": false,
469
+ "query": {
470
+ "q": "avg(\navg(irate(container_cpu_usage_seconds_total{container!~\"(POD|istio-proxy)\", namespace=\"#{namespace}\", pod=~\"#{workload}-[0-9a-z]+-[0-9a-z]+\"}[5m]) ) by (pod)\n/\navg( kube_pod_container_resource_limits_cpu_cores{namespace=\"#{namespace}\", pod=~\"#{workload}-[0-9a-z]+-[0-9a-z]+\"} ) by (pod)\n)",
471
+ "code": "A",
472
+ "type": "promql",
473
+ "promqlCode": 1,
474
+ "alias": ""
475
+ },
476
+ "extend": {
477
+ "refId": "A"
478
+ }
479
+ }
480
+ ]
481
+ },
482
+ {
483
+ "name": "整体内存使用率",
484
+ "type": "gauge",
485
+ "group": {
486
+ "name": null
487
+ },
488
+ "pos": {
489
+ "x": 14,
490
+ "y": 0.5,
491
+ "w": 5,
492
+ "h": 15.3
493
+ },
494
+ "extend": {
495
+ "settings": {
496
+ "showTitle": true,
497
+ "titleDesc": "",
498
+ "isSampling": true,
499
+ "changeWorkspace": false,
500
+ "showFieldMapping": false,
501
+ "openThousandsSeparator": true,
502
+ "precision": "0",
503
+ "timeInterval": "auto",
504
+ "fixedTime": "",
505
+ "maxPointCount": null,
506
+ "legendPostion": "none",
507
+ "lineType": "linear",
508
+ "stackType": "time",
509
+ "chartType": "line",
510
+ "isTimeInterval": false,
511
+ "unitType": "global",
512
+ "globalUnit": [
513
+ "custom",
514
+ "percentunit"
515
+ ],
516
+ "levels": [
517
+ {
518
+ "title": "Level 1",
519
+ "value": 0,
520
+ "bgColor": "green"
521
+ },
522
+ {
523
+ "title": "Level 2",
524
+ "value": 0.7,
525
+ "bgColor": "yellow"
526
+ },
527
+ {
528
+ "title": "Level 3",
529
+ "value": 0.9,
530
+ "bgColor": "red"
531
+ }
532
+ ],
533
+ "min": 0,
534
+ "max": 1,
535
+ "direction": "horizontal",
536
+ "mainMeasurementQueryCode": "A",
537
+ "extend": {
538
+ "appearance": {
539
+ "reduceCalcs": [
540
+ "lastNotNull"
541
+ ],
542
+ "reduceValues": false,
543
+ "gaugeMode": "gauge"
544
+ }
545
+ }
546
+ },
547
+ "sourcePanelType": "gauge",
548
+ "sourcePanelId": 12,
549
+ "pluginVersion": "7.5.4",
550
+ "grafana": {
551
+ "fieldConfig": {
552
+ "defaults": {
553
+ "color": {
554
+ "mode": "thresholds"
555
+ },
556
+ "decimals": 0,
557
+ "mappings": [
558
+ {
559
+ "id": 0,
560
+ "op": "=",
561
+ "text": "N/A",
562
+ "type": 1,
563
+ "value": "null"
564
+ }
565
+ ],
566
+ "max": 1,
567
+ "min": 0,
568
+ "thresholds": {
569
+ "mode": "absolute",
570
+ "steps": [
571
+ {
572
+ "color": "green",
573
+ "value": null
574
+ },
575
+ {
576
+ "color": "yellow",
577
+ "value": 0.7
578
+ },
579
+ {
580
+ "color": "red",
581
+ "value": 0.9
582
+ }
583
+ ]
584
+ },
585
+ "unit": "percentunit"
586
+ }
587
+ },
588
+ "options": {
589
+ "orientation": "horizontal",
590
+ "reduceOptions": {
591
+ "calcs": [
592
+ "lastNotNull"
593
+ ],
594
+ "fields": "",
595
+ "values": false
596
+ },
597
+ "showThresholdLabels": false,
598
+ "showThresholdMarkers": true
599
+ },
600
+ "datasource": "Prometheus"
601
+ }
602
+ },
603
+ "queries": [
604
+ {
605
+ "name": "",
606
+ "type": "gauge",
607
+ "qtype": "promql",
608
+ "datasource": "dataflux",
609
+ "disabled": false,
610
+ "query": {
611
+ "q": "avg(\navg(container_memory_working_set_bytes{ container=\"#{workload}\",namespace=\"#{namespace}\", pod=~\"#{workload}-[0-9a-z]+-[0-9a-z]+\"} ) by (pod)\n/\nmax( kube_pod_container_resource_limits_memory_bytes{container=~\"#{workload}\"} ) by (pod)\n)",
612
+ "code": "A",
613
+ "type": "promql",
614
+ "promqlCode": 1,
615
+ "alias": ""
616
+ },
617
+ "extend": {
618
+ "refId": "A"
619
+ }
620
+ }
621
+ ]
622
+ },
623
+ {
624
+ "name": "实例可用率",
625
+ "type": "gauge",
626
+ "group": {
627
+ "name": null
628
+ },
629
+ "pos": {
630
+ "x": 19,
631
+ "y": 0.5,
632
+ "w": 5,
633
+ "h": 15.3
634
+ },
635
+ "extend": {
636
+ "settings": {
637
+ "showTitle": true,
638
+ "titleDesc": "",
639
+ "isSampling": true,
640
+ "changeWorkspace": false,
641
+ "showFieldMapping": false,
642
+ "openThousandsSeparator": true,
643
+ "precision": "0",
644
+ "timeInterval": "auto",
645
+ "fixedTime": "",
646
+ "maxPointCount": null,
647
+ "legendPostion": "none",
648
+ "lineType": "linear",
649
+ "stackType": "time",
650
+ "chartType": "line",
651
+ "isTimeInterval": false,
652
+ "unitType": "global",
653
+ "globalUnit": [
654
+ "custom",
655
+ "percentunit"
656
+ ],
657
+ "levels": [
658
+ {
659
+ "title": "Level 1",
660
+ "value": 0,
661
+ "bgColor": "red"
662
+ },
663
+ {
664
+ "title": "Level 2",
665
+ "value": 0.3,
666
+ "bgColor": "yellow"
667
+ },
668
+ {
669
+ "title": "Level 3",
670
+ "value": 0.5,
671
+ "bgColor": "green"
672
+ }
673
+ ],
674
+ "alias": [
675
+ {
676
+ "alias": "{{ deployment }}",
677
+ "key": "A",
678
+ "name": "A"
679
+ }
680
+ ],
681
+ "min": 0,
682
+ "max": 1,
683
+ "direction": "horizontal",
684
+ "mainMeasurementQueryCode": "A",
685
+ "extend": {
686
+ "appearance": {
687
+ "reduceCalcs": [
688
+ "lastNotNull"
689
+ ],
690
+ "reduceValues": false,
691
+ "gaugeMode": "gauge"
692
+ }
693
+ }
694
+ },
695
+ "sourcePanelType": "gauge",
696
+ "sourcePanelId": 19,
697
+ "pluginVersion": "7.5.4",
698
+ "grafana": {
699
+ "fieldConfig": {
700
+ "defaults": {
701
+ "color": {
702
+ "mode": "thresholds"
703
+ },
704
+ "decimals": 0,
705
+ "mappings": [
706
+ {
707
+ "id": 0,
708
+ "op": "=",
709
+ "text": "N/A",
710
+ "type": 1,
711
+ "value": "null"
712
+ }
713
+ ],
714
+ "max": 1,
715
+ "min": 0,
716
+ "thresholds": {
717
+ "mode": "absolute",
718
+ "steps": [
719
+ {
720
+ "color": "red",
721
+ "value": null
722
+ },
723
+ {
724
+ "color": "yellow",
725
+ "value": 0.3
726
+ },
727
+ {
728
+ "color": "green",
729
+ "value": 0.5
730
+ }
731
+ ]
732
+ },
733
+ "unit": "percentunit"
734
+ }
735
+ },
736
+ "options": {
737
+ "orientation": "horizontal",
738
+ "reduceOptions": {
739
+ "calcs": [
740
+ "lastNotNull"
741
+ ],
742
+ "fields": "",
743
+ "values": false
744
+ },
745
+ "showThresholdLabels": false,
746
+ "showThresholdMarkers": true
747
+ },
748
+ "datasource": "Prometheus"
749
+ }
750
+ },
751
+ "queries": [
752
+ {
753
+ "name": "{{ deployment }}",
754
+ "type": "gauge",
755
+ "qtype": "promql",
756
+ "datasource": "dataflux",
757
+ "disabled": false,
758
+ "query": {
759
+ "q": "kube_deployment_status_replicas_available{deployment=~\"#{workload}\"} / kube_deployment_spec_replicas{deployment=~\"#{workload}\"} ",
760
+ "code": "A",
761
+ "type": "promql",
762
+ "promqlCode": 1,
763
+ "alias": "{{ deployment }}"
764
+ },
765
+ "extend": {
766
+ "refId": "A"
767
+ }
768
+ }
769
+ ]
770
+ },
771
+ {
772
+ "name": "可用副本数",
773
+ "type": "sequence",
774
+ "group": {
775
+ "name": null
776
+ },
777
+ "pos": {
778
+ "x": 0,
779
+ "y": 6.2,
780
+ "w": 9,
781
+ "h": 9.6
782
+ },
783
+ "extend": {
784
+ "settings": {
785
+ "showTitle": true,
786
+ "titleDesc": "",
787
+ "isSampling": true,
788
+ "changeWorkspace": false,
789
+ "showFieldMapping": false,
790
+ "openThousandsSeparator": true,
791
+ "precision": "2",
792
+ "timeInterval": "auto",
793
+ "fixedTime": "",
794
+ "maxPointCount": null,
795
+ "showLegend": true,
796
+ "legendPostion": "none",
797
+ "legendValues": [
798
+ "last",
799
+ "min"
800
+ ],
801
+ "showLine": true,
802
+ "lineType": "linear",
803
+ "connectNulls": false,
804
+ "openStack": false,
805
+ "stackType": "time",
806
+ "chartType": "line",
807
+ "isTimeInterval": true,
808
+ "xAxisShowType": "time",
809
+ "unitType": "global",
810
+ "globalUnit": [
811
+ "custom",
812
+ "short"
813
+ ],
814
+ "alias": [
815
+ {
816
+ "alias": "{{ deployment }}",
817
+ "key": "A",
818
+ "name": "A"
819
+ }
820
+ ],
821
+ "mainMeasurementQueryCode": "A",
822
+ "extend": {
823
+ "appearance": {
824
+ "lineWidth": 1,
825
+ "fillOpacity": 10,
826
+ "pointMode": "never"
827
+ }
828
+ }
829
+ },
830
+ "sourcePanelType": "graph",
831
+ "sourcePanelId": 6,
832
+ "pluginVersion": "7.5.4",
833
+ "grafana": {
834
+ "options": {
835
+ "alertThreshold": true
836
+ },
837
+ "datasource": "Prometheus"
838
+ }
839
+ },
840
+ "queries": [
841
+ {
842
+ "name": "{{ deployment }}",
843
+ "type": "sequence",
844
+ "qtype": "promql",
845
+ "datasource": "dataflux",
846
+ "disabled": false,
847
+ "query": {
848
+ "q": "kube_deployment_status_replicas_available{deployment=~\"#{workload}\"}",
849
+ "code": "A",
850
+ "type": "promql",
851
+ "promqlCode": 1,
852
+ "alias": "{{ deployment }}"
853
+ },
854
+ "extend": {
855
+ "refId": "A"
856
+ }
857
+ }
858
+ ]
859
+ },
860
+ {
861
+ "name": "CPU使用率",
862
+ "type": "sequence",
863
+ "group": {
864
+ "name": null
865
+ },
866
+ "pos": {
867
+ "x": 0,
868
+ "y": 15.7,
869
+ "w": 12,
870
+ "h": 15.3
871
+ },
872
+ "extend": {
873
+ "settings": {
874
+ "showTitle": true,
875
+ "titleDesc": "",
876
+ "isSampling": true,
877
+ "changeWorkspace": false,
878
+ "showFieldMapping": false,
879
+ "openThousandsSeparator": true,
880
+ "precision": "2",
881
+ "timeInterval": "auto",
882
+ "fixedTime": "",
883
+ "maxPointCount": null,
884
+ "showLegend": true,
885
+ "legendPostion": "none",
886
+ "legendValues": [
887
+ "last",
888
+ "max"
889
+ ],
890
+ "showLine": true,
891
+ "lineType": "linear",
892
+ "connectNulls": false,
893
+ "openStack": false,
894
+ "stackType": "time",
895
+ "chartType": "line",
896
+ "isTimeInterval": true,
897
+ "xAxisShowType": "time",
898
+ "unitType": "global",
899
+ "globalUnit": [
900
+ "custom",
901
+ "percentunit"
902
+ ],
903
+ "alias": [
904
+ {
905
+ "alias": "{{ pod }} ",
906
+ "key": "A",
907
+ "name": "A"
908
+ }
909
+ ],
910
+ "mainMeasurementQueryCode": "A",
911
+ "extend": {
912
+ "appearance": {
913
+ "lineWidth": 1,
914
+ "fillOpacity": 10,
915
+ "pointMode": "never"
916
+ }
917
+ }
918
+ },
919
+ "sourcePanelType": "graph",
920
+ "sourcePanelId": 2,
921
+ "pluginVersion": "7.5.4",
922
+ "grafana": {
923
+ "options": {
924
+ "alertThreshold": true
925
+ },
926
+ "datasource": "Prometheus"
927
+ }
928
+ },
929
+ "queries": [
930
+ {
931
+ "name": "{{ pod }} ",
932
+ "type": "sequence",
933
+ "qtype": "promql",
934
+ "datasource": "dataflux",
935
+ "disabled": false,
936
+ "query": {
937
+ "q": "avg(irate(container_cpu_usage_seconds_total{container!~\"(POD|istio-proxy)\", namespace=\"#{namespace}\", pod=~\"#{workload}-[0-9a-z]+-[0-9a-z]+\"}[5m]) ) by (pod)\n/\nmax( kube_pod_container_resource_limits_cpu_cores{namespace=\"#{namespace}\", pod=~\"#{workload}-[0-9a-z]+-[0-9a-z]+\"} ) by (pod)",
938
+ "code": "A",
939
+ "type": "promql",
940
+ "promqlCode": 1,
941
+ "alias": "{{ pod }} "
942
+ },
943
+ "extend": {
944
+ "refId": "A"
945
+ }
946
+ }
947
+ ]
948
+ },
949
+ {
950
+ "name": "内存使用率",
951
+ "type": "sequence",
952
+ "group": {
953
+ "name": null
954
+ },
955
+ "pos": {
956
+ "x": 12,
957
+ "y": 15.7,
958
+ "w": 12,
959
+ "h": 15.3
960
+ },
961
+ "extend": {
962
+ "settings": {
963
+ "showTitle": true,
964
+ "titleDesc": "",
965
+ "isSampling": true,
966
+ "changeWorkspace": false,
967
+ "showFieldMapping": false,
968
+ "openThousandsSeparator": true,
969
+ "precision": "2",
970
+ "timeInterval": "auto",
971
+ "fixedTime": "",
972
+ "maxPointCount": null,
973
+ "showLegend": true,
974
+ "legendPostion": "none",
975
+ "legendValues": [
976
+ "last",
977
+ "min"
978
+ ],
979
+ "showLine": true,
980
+ "lineType": "linear",
981
+ "connectNulls": false,
982
+ "openStack": false,
983
+ "stackType": "time",
984
+ "chartType": "line",
985
+ "isTimeInterval": true,
986
+ "xAxisShowType": "time",
987
+ "unitType": "global",
988
+ "globalUnit": [
989
+ "custom",
990
+ "percentunit"
991
+ ],
992
+ "alias": [
993
+ {
994
+ "alias": "{{ pod }}",
995
+ "key": "A",
996
+ "name": "A"
997
+ }
998
+ ],
999
+ "mainMeasurementQueryCode": "A",
1000
+ "extend": {
1001
+ "appearance": {
1002
+ "lineWidth": 1,
1003
+ "fillOpacity": 10,
1004
+ "pointMode": "never"
1005
+ }
1006
+ }
1007
+ },
1008
+ "sourcePanelType": "graph",
1009
+ "sourcePanelId": 13,
1010
+ "pluginVersion": "7.5.4",
1011
+ "grafana": {
1012
+ "options": {
1013
+ "alertThreshold": true
1014
+ },
1015
+ "datasource": "Prometheus"
1016
+ }
1017
+ },
1018
+ "queries": [
1019
+ {
1020
+ "name": "{{ pod }}",
1021
+ "type": "sequence",
1022
+ "qtype": "promql",
1023
+ "datasource": "dataflux",
1024
+ "disabled": false,
1025
+ "query": {
1026
+ "q": "avg(container_memory_working_set_bytes{ container=\"#{workload}\", namespace=\"#{namespace}\", pod=~\"#{workload}-[0-9a-z]+-[0-9a-z]+\"} ) by (pod)\n/\nmax( kube_pod_container_resource_limits_memory_bytes{namespace=\"#{namespace}\", pod=~\"#{workload}-[0-9a-z]+-[0-9a-z]+\"} ) by (pod)",
1027
+ "code": "A",
1028
+ "type": "promql",
1029
+ "promqlCode": 1,
1030
+ "alias": "{{ pod }}"
1031
+ },
1032
+ "extend": {
1033
+ "refId": "A"
1034
+ }
1035
+ }
1036
+ ]
1037
+ },
1038
+ {
1039
+ "name": "磁盘读取速率",
1040
+ "type": "sequence",
1041
+ "group": {
1042
+ "name": null
1043
+ },
1044
+ "pos": {
1045
+ "x": 0,
1046
+ "y": 30.9,
1047
+ "w": 12,
1048
+ "h": 15.3
1049
+ },
1050
+ "extend": {
1051
+ "settings": {
1052
+ "showTitle": true,
1053
+ "titleDesc": "",
1054
+ "isSampling": true,
1055
+ "changeWorkspace": false,
1056
+ "showFieldMapping": false,
1057
+ "openThousandsSeparator": true,
1058
+ "precision": "2",
1059
+ "timeInterval": "auto",
1060
+ "fixedTime": "",
1061
+ "maxPointCount": null,
1062
+ "showLegend": true,
1063
+ "legendPostion": "none",
1064
+ "legendValues": [
1065
+ "last",
1066
+ "max"
1067
+ ],
1068
+ "showLine": true,
1069
+ "lineType": "linear",
1070
+ "connectNulls": false,
1071
+ "openStack": false,
1072
+ "stackType": "time",
1073
+ "chartType": "line",
1074
+ "isTimeInterval": true,
1075
+ "xAxisShowType": "time",
1076
+ "unitType": "global",
1077
+ "globalUnit": [
1078
+ "digital",
1079
+ "B"
1080
+ ],
1081
+ "alias": [
1082
+ {
1083
+ "alias": "{{ pod }}",
1084
+ "key": "A",
1085
+ "name": "A"
1086
+ }
1087
+ ],
1088
+ "mainMeasurementQueryCode": "A",
1089
+ "extend": {
1090
+ "appearance": {
1091
+ "lineWidth": 1,
1092
+ "fillOpacity": 10,
1093
+ "pointMode": "never"
1094
+ }
1095
+ }
1096
+ },
1097
+ "sourcePanelType": "graph",
1098
+ "sourcePanelId": 14,
1099
+ "pluginVersion": "7.5.4",
1100
+ "grafana": {
1101
+ "options": {
1102
+ "alertThreshold": true
1103
+ },
1104
+ "datasource": "Prometheus"
1105
+ }
1106
+ },
1107
+ "queries": [
1108
+ {
1109
+ "name": "{{ pod }}",
1110
+ "type": "sequence",
1111
+ "qtype": "promql",
1112
+ "datasource": "dataflux",
1113
+ "disabled": false,
1114
+ "query": {
1115
+ "q": "rate(container_fs_reads_bytes_total{namespace=~\"#{namespace}\", container=~\"#{workload}\", pod=~\"#{workload}-[0-9a-z]+-[0-9a-z]+\"}[5m])",
1116
+ "code": "A",
1117
+ "type": "promql",
1118
+ "promqlCode": 1,
1119
+ "alias": "{{ pod }}"
1120
+ },
1121
+ "extend": {
1122
+ "refId": "A"
1123
+ }
1124
+ }
1125
+ ]
1126
+ },
1127
+ {
1128
+ "name": "磁盘写入速率",
1129
+ "type": "sequence",
1130
+ "group": {
1131
+ "name": null
1132
+ },
1133
+ "pos": {
1134
+ "x": 12,
1135
+ "y": 30.9,
1136
+ "w": 12,
1137
+ "h": 15.3
1138
+ },
1139
+ "extend": {
1140
+ "settings": {
1141
+ "showTitle": true,
1142
+ "titleDesc": "",
1143
+ "isSampling": true,
1144
+ "changeWorkspace": false,
1145
+ "showFieldMapping": false,
1146
+ "openThousandsSeparator": true,
1147
+ "precision": "2",
1148
+ "timeInterval": "auto",
1149
+ "fixedTime": "",
1150
+ "maxPointCount": null,
1151
+ "showLegend": true,
1152
+ "legendPostion": "none",
1153
+ "legendValues": [
1154
+ "last",
1155
+ "max"
1156
+ ],
1157
+ "showLine": true,
1158
+ "lineType": "linear",
1159
+ "connectNulls": false,
1160
+ "openStack": false,
1161
+ "stackType": "time",
1162
+ "chartType": "line",
1163
+ "isTimeInterval": true,
1164
+ "xAxisShowType": "time",
1165
+ "unitType": "global",
1166
+ "globalUnit": [
1167
+ "digital",
1168
+ "B"
1169
+ ],
1170
+ "alias": [
1171
+ {
1172
+ "alias": "{{ pod }}",
1173
+ "key": "A",
1174
+ "name": "A"
1175
+ }
1176
+ ],
1177
+ "mainMeasurementQueryCode": "A",
1178
+ "extend": {
1179
+ "appearance": {
1180
+ "lineWidth": 1,
1181
+ "fillOpacity": 10,
1182
+ "pointMode": "never"
1183
+ }
1184
+ }
1185
+ },
1186
+ "sourcePanelType": "graph",
1187
+ "sourcePanelId": 16,
1188
+ "pluginVersion": "7.5.4",
1189
+ "grafana": {
1190
+ "options": {
1191
+ "alertThreshold": true
1192
+ },
1193
+ "datasource": "Prometheus"
1194
+ }
1195
+ },
1196
+ "queries": [
1197
+ {
1198
+ "name": "{{ pod }}",
1199
+ "type": "sequence",
1200
+ "qtype": "promql",
1201
+ "datasource": "dataflux",
1202
+ "disabled": false,
1203
+ "query": {
1204
+ "q": "rate(container_fs_writes_bytes_total{namespace=~\"#{namespace}\", container=~\"#{workload}\", pod=~\"#{workload}-[0-9a-z]+-[0-9a-z]+\"}[5m])",
1205
+ "code": "A",
1206
+ "type": "promql",
1207
+ "promqlCode": 1,
1208
+ "alias": "{{ pod }}"
1209
+ },
1210
+ "extend": {
1211
+ "refId": "A"
1212
+ }
1213
+ }
1214
+ ]
1215
+ },
1216
+ {
1217
+ "name": "网络传输速率",
1218
+ "type": "sequence",
1219
+ "group": {
1220
+ "name": null
1221
+ },
1222
+ "pos": {
1223
+ "x": 0,
1224
+ "y": 46.1,
1225
+ "w": 12,
1226
+ "h": 17.2
1227
+ },
1228
+ "extend": {
1229
+ "settings": {
1230
+ "showTitle": true,
1231
+ "titleDesc": "",
1232
+ "isSampling": true,
1233
+ "changeWorkspace": false,
1234
+ "showFieldMapping": false,
1235
+ "openThousandsSeparator": true,
1236
+ "precision": "2",
1237
+ "timeInterval": "auto",
1238
+ "fixedTime": "",
1239
+ "maxPointCount": null,
1240
+ "showLegend": true,
1241
+ "legendPostion": "none",
1242
+ "legendValues": [
1243
+ "last",
1244
+ "max"
1245
+ ],
1246
+ "showLine": true,
1247
+ "lineType": "linear",
1248
+ "connectNulls": false,
1249
+ "openStack": false,
1250
+ "stackType": "time",
1251
+ "chartType": "line",
1252
+ "isTimeInterval": true,
1253
+ "xAxisShowType": "time",
1254
+ "unitType": "global",
1255
+ "globalUnit": [
1256
+ "digital",
1257
+ "B"
1258
+ ],
1259
+ "alias": [
1260
+ {
1261
+ "alias": "{{ pod }}",
1262
+ "key": "A",
1263
+ "name": "A"
1264
+ }
1265
+ ],
1266
+ "mainMeasurementQueryCode": "A",
1267
+ "extend": {
1268
+ "appearance": {
1269
+ "lineWidth": 1,
1270
+ "fillOpacity": 10,
1271
+ "pointMode": "never"
1272
+ }
1273
+ }
1274
+ },
1275
+ "sourcePanelType": "graph",
1276
+ "sourcePanelId": 15,
1277
+ "pluginVersion": "7.5.4",
1278
+ "grafana": {
1279
+ "options": {
1280
+ "alertThreshold": true
1281
+ },
1282
+ "datasource": "Prometheus"
1283
+ }
1284
+ },
1285
+ "queries": [
1286
+ {
1287
+ "name": "{{ pod }}",
1288
+ "type": "sequence",
1289
+ "qtype": "promql",
1290
+ "datasource": "dataflux",
1291
+ "disabled": false,
1292
+ "query": {
1293
+ "q": "irate(container_network_transmit_bytes_total{namespace=~\"#{namespace}\", pod=~\"#{workload}-[0-9a-z]+-[0-9a-z]+\"}[5m])",
1294
+ "code": "A",
1295
+ "type": "promql",
1296
+ "promqlCode": 1,
1297
+ "alias": "{{ pod }}"
1298
+ },
1299
+ "extend": {
1300
+ "refId": "A"
1301
+ }
1302
+ }
1303
+ ]
1304
+ },
1305
+ {
1306
+ "name": "网络接收速率",
1307
+ "type": "sequence",
1308
+ "group": {
1309
+ "name": null
1310
+ },
1311
+ "pos": {
1312
+ "x": 12,
1313
+ "y": 46.1,
1314
+ "w": 12,
1315
+ "h": 17.2
1316
+ },
1317
+ "extend": {
1318
+ "settings": {
1319
+ "showTitle": true,
1320
+ "titleDesc": "",
1321
+ "isSampling": true,
1322
+ "changeWorkspace": false,
1323
+ "showFieldMapping": false,
1324
+ "openThousandsSeparator": true,
1325
+ "precision": "2",
1326
+ "timeInterval": "auto",
1327
+ "fixedTime": "",
1328
+ "maxPointCount": null,
1329
+ "showLegend": true,
1330
+ "legendPostion": "none",
1331
+ "legendValues": [
1332
+ "last",
1333
+ "max"
1334
+ ],
1335
+ "showLine": true,
1336
+ "lineType": "linear",
1337
+ "connectNulls": false,
1338
+ "openStack": false,
1339
+ "stackType": "time",
1340
+ "chartType": "line",
1341
+ "isTimeInterval": true,
1342
+ "xAxisShowType": "time",
1343
+ "unitType": "global",
1344
+ "globalUnit": [
1345
+ "digital",
1346
+ "B"
1347
+ ],
1348
+ "alias": [
1349
+ {
1350
+ "alias": "{{ pod }}",
1351
+ "key": "B",
1352
+ "name": "B"
1353
+ }
1354
+ ],
1355
+ "mainMeasurementQueryCode": "B",
1356
+ "extend": {
1357
+ "appearance": {
1358
+ "lineWidth": 1,
1359
+ "fillOpacity": 10,
1360
+ "pointMode": "never"
1361
+ }
1362
+ }
1363
+ },
1364
+ "sourcePanelType": "graph",
1365
+ "sourcePanelId": 17,
1366
+ "pluginVersion": "7.5.4",
1367
+ "grafana": {
1368
+ "options": {
1369
+ "alertThreshold": true
1370
+ },
1371
+ "datasource": "Prometheus"
1372
+ }
1373
+ },
1374
+ "queries": [
1375
+ {
1376
+ "name": "{{ pod }}",
1377
+ "type": "sequence",
1378
+ "qtype": "promql",
1379
+ "datasource": "dataflux",
1380
+ "disabled": false,
1381
+ "query": {
1382
+ "q": "irate(container_network_receive_bytes_total{namespace=~\"#{namespace}\", pod=~\"#{workload}-[0-9a-z]+-[0-9a-z]+\"}[5m])",
1383
+ "code": "B",
1384
+ "type": "promql",
1385
+ "promqlCode": 1,
1386
+ "alias": "{{ pod }}"
1387
+ },
1388
+ "extend": {
1389
+ "refId": "B"
1390
+ }
1391
+ }
1392
+ ]
1393
+ },
1394
+ {
1395
+ "name": "文件打开数",
1396
+ "type": "sequence",
1397
+ "group": {
1398
+ "name": null
1399
+ },
1400
+ "pos": {
1401
+ "x": 0,
1402
+ "y": 63.2,
1403
+ "w": 12,
1404
+ "h": 15.3
1405
+ },
1406
+ "extend": {
1407
+ "settings": {
1408
+ "showTitle": true,
1409
+ "titleDesc": "",
1410
+ "isSampling": true,
1411
+ "changeWorkspace": false,
1412
+ "showFieldMapping": false,
1413
+ "openThousandsSeparator": true,
1414
+ "precision": "2",
1415
+ "timeInterval": "auto",
1416
+ "fixedTime": "",
1417
+ "maxPointCount": null,
1418
+ "showLegend": true,
1419
+ "legendPostion": "none",
1420
+ "legendValues": [
1421
+ "last",
1422
+ "max"
1423
+ ],
1424
+ "showLine": true,
1425
+ "lineType": "linear",
1426
+ "connectNulls": false,
1427
+ "openStack": false,
1428
+ "stackType": "time",
1429
+ "chartType": "line",
1430
+ "isTimeInterval": true,
1431
+ "xAxisShowType": "time",
1432
+ "unitType": "global",
1433
+ "globalUnit": [
1434
+ "custom",
1435
+ "short"
1436
+ ],
1437
+ "alias": [
1438
+ {
1439
+ "alias": "{{ pod }}",
1440
+ "key": "A",
1441
+ "name": "A"
1442
+ },
1443
+ {
1444
+ "alias": "{{ pod }}",
1445
+ "key": "B",
1446
+ "name": "B"
1447
+ }
1448
+ ],
1449
+ "mainMeasurementQueryCode": "A",
1450
+ "extend": {
1451
+ "appearance": {
1452
+ "lineWidth": 1,
1453
+ "fillOpacity": 10,
1454
+ "pointMode": "never"
1455
+ }
1456
+ }
1457
+ },
1458
+ "sourcePanelType": "graph",
1459
+ "sourcePanelId": 23,
1460
+ "pluginVersion": "7.5.4",
1461
+ "grafana": {
1462
+ "options": {
1463
+ "alertThreshold": true
1464
+ },
1465
+ "datasource": "Prometheus"
1466
+ }
1467
+ },
1468
+ "queries": [
1469
+ {
1470
+ "name": "{{ pod }}",
1471
+ "type": "sequence",
1472
+ "qtype": "promql",
1473
+ "datasource": "dataflux",
1474
+ "disabled": false,
1475
+ "query": {
1476
+ "q": "process_files_open{namespace=~\"#{namespace}\", service=~\"#{workload}\"}",
1477
+ "code": "A",
1478
+ "type": "promql",
1479
+ "promqlCode": 1,
1480
+ "alias": "{{ pod }}"
1481
+ },
1482
+ "extend": {
1483
+ "refId": "A"
1484
+ }
1485
+ },
1486
+ {
1487
+ "name": "{{ pod }}",
1488
+ "type": "sequence",
1489
+ "qtype": "promql",
1490
+ "datasource": "dataflux",
1491
+ "disabled": false,
1492
+ "query": {
1493
+ "q": "process_files_open_files{namespace=~\"#{namespace}\", service=~\"#{workload}\"}",
1494
+ "code": "B",
1495
+ "type": "promql",
1496
+ "promqlCode": 2,
1497
+ "alias": "{{ pod }}"
1498
+ },
1499
+ "extend": {
1500
+ "refId": "B"
1501
+ }
1502
+ }
1503
+ ]
1504
+ },
1505
+ {
1506
+ "name": "网络速率",
1507
+ "type": "sequence",
1508
+ "group": {
1509
+ "name": null
1510
+ },
1511
+ "pos": {
1512
+ "x": 12,
1513
+ "y": 63.2,
1514
+ "w": 12,
1515
+ "h": 15.3
1516
+ },
1517
+ "extend": {
1518
+ "settings": {
1519
+ "showTitle": true,
1520
+ "titleDesc": "",
1521
+ "isSampling": true,
1522
+ "changeWorkspace": false,
1523
+ "showFieldMapping": false,
1524
+ "openThousandsSeparator": true,
1525
+ "precision": "2",
1526
+ "timeInterval": "auto",
1527
+ "fixedTime": "",
1528
+ "maxPointCount": null,
1529
+ "showLegend": true,
1530
+ "legendPostion": "none",
1531
+ "legendValues": [
1532
+ "last",
1533
+ "min",
1534
+ "max"
1535
+ ],
1536
+ "showLine": true,
1537
+ "lineType": "linear",
1538
+ "connectNulls": false,
1539
+ "openStack": false,
1540
+ "stackType": "time",
1541
+ "chartType": "line",
1542
+ "isTimeInterval": true,
1543
+ "xAxisShowType": "time",
1544
+ "unitType": "global",
1545
+ "globalUnit": [
1546
+ "digital",
1547
+ "B"
1548
+ ],
1549
+ "alias": [
1550
+ {
1551
+ "alias": "入方向",
1552
+ "key": "B",
1553
+ "name": "B"
1554
+ },
1555
+ {
1556
+ "alias": "出方向",
1557
+ "key": "A",
1558
+ "name": "A"
1559
+ }
1560
+ ],
1561
+ "mainMeasurementQueryCode": "B",
1562
+ "extend": {
1563
+ "appearance": {
1564
+ "lineWidth": 1,
1565
+ "fillOpacity": 10,
1566
+ "pointMode": "never"
1567
+ }
1568
+ }
1569
+ },
1570
+ "sourcePanelType": "graph",
1571
+ "sourcePanelId": 21,
1572
+ "pluginVersion": "7.5.4",
1573
+ "grafana": {
1574
+ "options": {
1575
+ "alertThreshold": true
1576
+ },
1577
+ "datasource": "Prometheus"
1578
+ }
1579
+ },
1580
+ "queries": [
1581
+ {
1582
+ "name": "入方向",
1583
+ "type": "sequence",
1584
+ "qtype": "promql",
1585
+ "datasource": "dataflux",
1586
+ "disabled": false,
1587
+ "query": {
1588
+ "q": "sum(irate(container_network_receive_bytes_total{namespace=~\"#{namespace}\", pod=~\"#{workload}-[0-9a-z]+-[0-9a-z]+\"}[5m]))",
1589
+ "code": "B",
1590
+ "type": "promql",
1591
+ "promqlCode": 1,
1592
+ "alias": "入方向"
1593
+ },
1594
+ "extend": {
1595
+ "refId": "B"
1596
+ }
1597
+ },
1598
+ {
1599
+ "name": "出方向",
1600
+ "type": "sequence",
1601
+ "qtype": "promql",
1602
+ "datasource": "dataflux",
1603
+ "disabled": false,
1604
+ "query": {
1605
+ "q": "0- sum(irate(container_network_transmit_bytes_total{namespace=~\"#{namespace}\", pod=~\"#{workload}-[0-9a-z]+-[0-9a-z]+\"}[5m]))",
1606
+ "code": "A",
1607
+ "type": "promql",
1608
+ "promqlCode": 2,
1609
+ "alias": "出方向"
1610
+ },
1611
+ "extend": {
1612
+ "refId": "A"
1613
+ }
1614
+ }
1615
+ ]
1616
+ },
1617
+ {
1618
+ "name": "业务状态码 isSuccess",
1619
+ "type": "sequence",
1620
+ "group": {
1621
+ "name": null
1622
+ },
1623
+ "pos": {
1624
+ "x": 0,
1625
+ "y": 78.4,
1626
+ "w": 12,
1627
+ "h": 15.3
1628
+ },
1629
+ "extend": {
1630
+ "settings": {
1631
+ "showTitle": true,
1632
+ "titleDesc": "",
1633
+ "isSampling": true,
1634
+ "changeWorkspace": false,
1635
+ "showFieldMapping": false,
1636
+ "openThousandsSeparator": true,
1637
+ "precision": "2",
1638
+ "timeInterval": "auto",
1639
+ "fixedTime": "",
1640
+ "maxPointCount": null,
1641
+ "showLegend": true,
1642
+ "legendPostion": "none",
1643
+ "legendValues": [
1644
+ "last"
1645
+ ],
1646
+ "showLine": true,
1647
+ "lineType": "linear",
1648
+ "connectNulls": true,
1649
+ "openStack": false,
1650
+ "stackType": "time",
1651
+ "chartType": "line",
1652
+ "isTimeInterval": true,
1653
+ "xAxisShowType": "time",
1654
+ "unitType": "global",
1655
+ "globalUnit": [
1656
+ "custom",
1657
+ "short"
1658
+ ],
1659
+ "alias": [
1660
+ {
1661
+ "alias": "{{isSuccess}}",
1662
+ "key": "A",
1663
+ "name": "A"
1664
+ }
1665
+ ],
1666
+ "mainMeasurementQueryCode": "A",
1667
+ "extend": {
1668
+ "appearance": {
1669
+ "lineWidth": 1,
1670
+ "fillOpacity": 10,
1671
+ "pointMode": "never"
1672
+ }
1673
+ }
1674
+ },
1675
+ "sourcePanelType": "graph",
1676
+ "sourcePanelId": 25,
1677
+ "pluginVersion": "7.5.4",
1678
+ "grafana": {
1679
+ "options": {
1680
+ "alertThreshold": true
1681
+ },
1682
+ "datasource": "VictoriaMetrics-Cluster"
1683
+ }
1684
+ },
1685
+ "queries": [
1686
+ {
1687
+ "name": "{{isSuccess}}",
1688
+ "type": "sequence",
1689
+ "qtype": "promql",
1690
+ "datasource": "dataflux",
1691
+ "disabled": false,
1692
+ "query": {
1693
+ "q": "product_appId_isSuccess:polaris_requests_business_code_total:increase1m{appId=~\"#{workload}\"}",
1694
+ "code": "A",
1695
+ "type": "promql",
1696
+ "promqlCode": 1,
1697
+ "alias": "{{isSuccess}}"
1698
+ },
1699
+ "extend": {
1700
+ "refId": "A"
1701
+ }
1702
+ }
1703
+ ]
1704
+ },
1705
+ {
1706
+ "name": "业务状态码 respCode - busCode",
1707
+ "type": "sequence",
1708
+ "group": {
1709
+ "name": null
1710
+ },
1711
+ "pos": {
1712
+ "x": 12,
1713
+ "y": 78.4,
1714
+ "w": 12,
1715
+ "h": 15.3
1716
+ },
1717
+ "extend": {
1718
+ "settings": {
1719
+ "showTitle": true,
1720
+ "titleDesc": "",
1721
+ "isSampling": true,
1722
+ "changeWorkspace": false,
1723
+ "showFieldMapping": false,
1724
+ "openThousandsSeparator": true,
1725
+ "precision": "2",
1726
+ "timeInterval": "auto",
1727
+ "fixedTime": "",
1728
+ "maxPointCount": null,
1729
+ "showLegend": true,
1730
+ "legendPostion": "none",
1731
+ "legendValues": [
1732
+ "last",
1733
+ "sum"
1734
+ ],
1735
+ "showLine": true,
1736
+ "lineType": "linear",
1737
+ "connectNulls": true,
1738
+ "openStack": false,
1739
+ "stackType": "time",
1740
+ "chartType": "line",
1741
+ "isTimeInterval": true,
1742
+ "xAxisShowType": "time",
1743
+ "unitType": "global",
1744
+ "globalUnit": [
1745
+ "custom",
1746
+ "short"
1747
+ ],
1748
+ "alias": [
1749
+ {
1750
+ "alias": "{{respCode}} - {{busCode}}",
1751
+ "key": "A",
1752
+ "name": "A"
1753
+ }
1754
+ ],
1755
+ "mainMeasurementQueryCode": "A",
1756
+ "extend": {
1757
+ "appearance": {
1758
+ "lineWidth": 1,
1759
+ "fillOpacity": 10,
1760
+ "pointMode": "never"
1761
+ }
1762
+ }
1763
+ },
1764
+ "sourcePanelType": "graph",
1765
+ "sourcePanelId": 26,
1766
+ "pluginVersion": "7.5.4",
1767
+ "grafana": {
1768
+ "options": {
1769
+ "alertThreshold": true
1770
+ },
1771
+ "datasource": "VictoriaMetrics-Cluster"
1772
+ }
1773
+ },
1774
+ "queries": [
1775
+ {
1776
+ "name": "{{respCode}} - {{busCode}}",
1777
+ "type": "sequence",
1778
+ "qtype": "promql",
1779
+ "datasource": "dataflux",
1780
+ "disabled": false,
1781
+ "query": {
1782
+ "q": "sum(product_appId_isSuccess_respCode_busCode:polaris_requests_business_code_total:increase1m{appId=~\"#{workload}\"}) by (respCode, busCode)",
1783
+ "code": "A",
1784
+ "type": "promql",
1785
+ "promqlCode": 1,
1786
+ "alias": "{{respCode}} - {{busCode}}"
1787
+ },
1788
+ "extend": {
1789
+ "refId": "A"
1790
+ }
1791
+ }
1792
+ ]
1793
+ },
1794
+ {
1795
+ "name": "访问量",
1796
+ "type": "sequence",
1797
+ "group": {
1798
+ "name": null
1799
+ },
1800
+ "pos": {
1801
+ "x": 0,
1802
+ "y": 93.6,
1803
+ "w": 12,
1804
+ "h": 15.3
1805
+ },
1806
+ "extend": {
1807
+ "settings": {
1808
+ "showTitle": true,
1809
+ "titleDesc": "",
1810
+ "isSampling": true,
1811
+ "changeWorkspace": false,
1812
+ "showFieldMapping": false,
1813
+ "openThousandsSeparator": true,
1814
+ "precision": "2",
1815
+ "timeInterval": "auto",
1816
+ "fixedTime": "",
1817
+ "maxPointCount": null,
1818
+ "showLegend": true,
1819
+ "legendPostion": "none",
1820
+ "legendValues": [
1821
+ "last",
1822
+ "max"
1823
+ ],
1824
+ "showLine": true,
1825
+ "lineType": "linear",
1826
+ "connectNulls": false,
1827
+ "openStack": false,
1828
+ "stackType": "time",
1829
+ "chartType": "line",
1830
+ "isTimeInterval": true,
1831
+ "xAxisShowType": "time",
1832
+ "unitType": "global",
1833
+ "globalUnit": [
1834
+ "custom",
1835
+ "short"
1836
+ ],
1837
+ "alias": [
1838
+ {
1839
+ "alias": "{{pod}}",
1840
+ "key": "A",
1841
+ "name": "A"
1842
+ }
1843
+ ],
1844
+ "mainMeasurementQueryCode": "A",
1845
+ "extend": {
1846
+ "appearance": {
1847
+ "lineWidth": 1,
1848
+ "fillOpacity": 10,
1849
+ "pointMode": "never"
1850
+ }
1851
+ }
1852
+ },
1853
+ "sourcePanelType": "graph",
1854
+ "sourcePanelId": 30,
1855
+ "pluginVersion": "7.5.4",
1856
+ "grafana": {
1857
+ "options": {
1858
+ "alertThreshold": true
1859
+ },
1860
+ "datasource": "Prometheus"
1861
+ }
1862
+ },
1863
+ "queries": [
1864
+ {
1865
+ "name": "{{pod}}",
1866
+ "type": "sequence",
1867
+ "qtype": "promql",
1868
+ "datasource": "dataflux",
1869
+ "disabled": false,
1870
+ "query": {
1871
+ "q": "sum(increase(nginx_ingress_controller_requests{namespace=\"#{namespace}\", service=\"#{workload}\",service!~\"ingress.+\"}[1m])) by (service) ",
1872
+ "code": "A",
1873
+ "type": "promql",
1874
+ "promqlCode": 1,
1875
+ "alias": "{{pod}}"
1876
+ },
1877
+ "extend": {
1878
+ "refId": "A"
1879
+ }
1880
+ }
1881
+ ]
1882
+ },
1883
+ {
1884
+ "name": "状态码",
1885
+ "type": "sequence",
1886
+ "group": {
1887
+ "name": null
1888
+ },
1889
+ "pos": {
1890
+ "x": 12,
1891
+ "y": 93.6,
1892
+ "w": 12,
1893
+ "h": 15.3
1894
+ },
1895
+ "extend": {
1896
+ "settings": {
1897
+ "showTitle": true,
1898
+ "titleDesc": "",
1899
+ "isSampling": true,
1900
+ "changeWorkspace": false,
1901
+ "showFieldMapping": false,
1902
+ "openThousandsSeparator": true,
1903
+ "precision": "2",
1904
+ "timeInterval": "auto",
1905
+ "fixedTime": "",
1906
+ "maxPointCount": null,
1907
+ "showLegend": true,
1908
+ "legendPostion": "none",
1909
+ "legendValues": [
1910
+ "last",
1911
+ "max"
1912
+ ],
1913
+ "showLine": true,
1914
+ "lineType": "linear",
1915
+ "connectNulls": false,
1916
+ "openStack": false,
1917
+ "stackType": "time",
1918
+ "chartType": "line",
1919
+ "isTimeInterval": true,
1920
+ "xAxisShowType": "time",
1921
+ "unitType": "global",
1922
+ "globalUnit": [
1923
+ "custom",
1924
+ "short"
1925
+ ],
1926
+ "alias": [
1927
+ {
1928
+ "alias": "{{status}}",
1929
+ "key": "A",
1930
+ "name": "A"
1931
+ }
1932
+ ],
1933
+ "mainMeasurementQueryCode": "A",
1934
+ "extend": {
1935
+ "appearance": {
1936
+ "lineWidth": 1,
1937
+ "fillOpacity": 10,
1938
+ "pointMode": "never"
1939
+ }
1940
+ }
1941
+ },
1942
+ "sourcePanelType": "graph",
1943
+ "sourcePanelId": 29,
1944
+ "pluginVersion": "7.5.4",
1945
+ "grafana": {
1946
+ "options": {
1947
+ "alertThreshold": true
1948
+ },
1949
+ "datasource": "VictoriaMetrics-Cluster"
1950
+ }
1951
+ },
1952
+ "queries": [
1953
+ {
1954
+ "name": "{{status}}",
1955
+ "type": "sequence",
1956
+ "qtype": "promql",
1957
+ "datasource": "dataflux",
1958
+ "disabled": false,
1959
+ "query": {
1960
+ "q": "sum(increase(nginx_ingress_controller_requests{status=~\"(40[1-4]|40[5-9]|4[1-9][0-9]|5[0-9]+)\", namespace=\"#{namespace}\", service=\"#{workload}\"}[1m])) by (service, status) > 0",
1961
+ "code": "A",
1962
+ "type": "promql",
1963
+ "promqlCode": 1,
1964
+ "alias": "{{status}}"
1965
+ },
1966
+ "extend": {
1967
+ "refId": "A"
1968
+ }
1969
+ }
1970
+ ]
1971
+ },
1972
+ {
1973
+ "name": "cpu throttle (核心数)",
1974
+ "type": "sequence",
1975
+ "group": {
1976
+ "name": null
1977
+ },
1978
+ "pos": {
1979
+ "x": 0,
1980
+ "y": 108.8,
1981
+ "w": 12,
1982
+ "h": 15.3
1983
+ },
1984
+ "extend": {
1985
+ "settings": {
1986
+ "showTitle": true,
1987
+ "titleDesc": "",
1988
+ "isSampling": true,
1989
+ "changeWorkspace": false,
1990
+ "showFieldMapping": false,
1991
+ "openThousandsSeparator": true,
1992
+ "precision": "2",
1993
+ "timeInterval": "auto",
1994
+ "fixedTime": "",
1995
+ "maxPointCount": null,
1996
+ "showLegend": true,
1997
+ "legendPostion": "none",
1998
+ "legendValues": [
1999
+ "last",
2000
+ "max"
2001
+ ],
2002
+ "showLine": true,
2003
+ "lineType": "linear",
2004
+ "connectNulls": false,
2005
+ "openStack": false,
2006
+ "stackType": "time",
2007
+ "chartType": "line",
2008
+ "isTimeInterval": true,
2009
+ "xAxisShowType": "time",
2010
+ "unitType": "global",
2011
+ "globalUnit": [
2012
+ "custom",
2013
+ "short"
2014
+ ],
2015
+ "alias": [
2016
+ {
2017
+ "alias": "{{pod}}",
2018
+ "key": "A",
2019
+ "name": "A"
2020
+ }
2021
+ ],
2022
+ "mainMeasurementQueryCode": "A",
2023
+ "extend": {
2024
+ "appearance": {
2025
+ "lineWidth": 1,
2026
+ "fillOpacity": 10,
2027
+ "pointMode": "never"
2028
+ }
2029
+ }
2030
+ },
2031
+ "sourcePanelType": "graph",
2032
+ "sourcePanelId": 28,
2033
+ "pluginVersion": "7.5.4",
2034
+ "grafana": {
2035
+ "options": {
2036
+ "alertThreshold": true
2037
+ },
2038
+ "datasource": "Prometheus"
2039
+ }
2040
+ },
2041
+ "queries": [
2042
+ {
2043
+ "name": "{{pod}}",
2044
+ "type": "sequence",
2045
+ "qtype": "promql",
2046
+ "datasource": "dataflux",
2047
+ "disabled": false,
2048
+ "query": {
2049
+ "q": "irate(container_cpu_cfs_throttled_seconds_total{container=~\"#{workload}\", namespace=\"#{namespace}\", pod=~\"#{workload}-[0-9a-z]+-[0-9a-z]+\"}[5m])",
2050
+ "code": "A",
2051
+ "type": "promql",
2052
+ "promqlCode": 1,
2053
+ "alias": "{{pod}}"
2054
+ },
2055
+ "extend": {
2056
+ "refId": "A"
2057
+ }
2058
+ }
2059
+ ]
2060
+ },
2061
+ {
2062
+ "name": "pod挂载状态",
2063
+ "type": "sequence",
2064
+ "group": {
2065
+ "name": null
2066
+ },
2067
+ "pos": {
2068
+ "x": 12,
2069
+ "y": 108.8,
2070
+ "w": 12,
2071
+ "h": 15.3
2072
+ },
2073
+ "extend": {
2074
+ "settings": {
2075
+ "showTitle": true,
2076
+ "titleDesc": "状态为1是挂载到ingress上了,开始接受流量",
2077
+ "isSampling": true,
2078
+ "changeWorkspace": false,
2079
+ "showFieldMapping": false,
2080
+ "openThousandsSeparator": true,
2081
+ "precision": "2",
2082
+ "timeInterval": "auto",
2083
+ "fixedTime": "",
2084
+ "maxPointCount": null,
2085
+ "showLegend": true,
2086
+ "legendPostion": "none",
2087
+ "legendValues": [
2088
+ "last",
2089
+ "max"
2090
+ ],
2091
+ "showLine": true,
2092
+ "lineType": "linear",
2093
+ "connectNulls": false,
2094
+ "openStack": false,
2095
+ "stackType": "time",
2096
+ "chartType": "line",
2097
+ "isTimeInterval": true,
2098
+ "xAxisShowType": "time",
2099
+ "unitType": "global",
2100
+ "globalUnit": [
2101
+ "custom",
2102
+ "short"
2103
+ ],
2104
+ "alias": [
2105
+ {
2106
+ "alias": "{{pod}}",
2107
+ "key": "A",
2108
+ "name": "A"
2109
+ }
2110
+ ],
2111
+ "mainMeasurementQueryCode": "A",
2112
+ "extend": {
2113
+ "appearance": {
2114
+ "lineWidth": 1,
2115
+ "fillOpacity": 10,
2116
+ "pointMode": "never"
2117
+ }
2118
+ }
2119
+ },
2120
+ "sourcePanelType": "graph",
2121
+ "sourcePanelId": 31,
2122
+ "pluginVersion": "7.5.4",
2123
+ "grafana": {
2124
+ "options": {
2125
+ "alertThreshold": true
2126
+ },
2127
+ "datasource": "Prometheus"
2128
+ }
2129
+ },
2130
+ "queries": [
2131
+ {
2132
+ "name": "{{pod}}",
2133
+ "type": "sequence",
2134
+ "qtype": "promql",
2135
+ "datasource": "dataflux",
2136
+ "disabled": false,
2137
+ "query": {
2138
+ "q": "kube_pod_container_status_ready{container=\"#{workload}\"} == 1",
2139
+ "code": "A",
2140
+ "type": "promql",
2141
+ "promqlCode": 1,
2142
+ "alias": "{{pod}}"
2143
+ },
2144
+ "extend": {
2145
+ "refId": "A"
2146
+ }
2147
+ }
2148
+ ]
2149
+ }
2150
+ ],
2151
+ "type": "template"
2152
+ }
2153
+ }