@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,1384 @@
1
+ {
2
+ "title": "test-0324 Copy1",
3
+ "uid": "prhbkx5Dk",
4
+ "dashboardExtend": {
5
+ "groupUnfoldStatus": {
6
+ "Row title": true
7
+ }
8
+ },
9
+ "main": {
10
+ "vars": [
11
+ {
12
+ "name": "hostABC",
13
+ "seq": 0,
14
+ "code": "host",
15
+ "hide": 0,
16
+ "multiple": false,
17
+ "includeStar": false,
18
+ "valueSort": "desc",
19
+ "extend": {
20
+ "originalType": "query",
21
+ "refresh": 1,
22
+ "skipUrlSync": false,
23
+ "sort": 0
24
+ },
25
+ "datasource": "dataflux",
26
+ "type": "PROMQL_QUERY",
27
+ "definition": {
28
+ "tag": "",
29
+ "field": "",
30
+ "value": "",
31
+ "metric": "",
32
+ "object": "",
33
+ "defaultVal": {
34
+ "label": "iZuf6bhp22agaui9uldhz4Z",
35
+ "value": "iZuf6bhp22agaui9uldhz4Z"
36
+ }
37
+ }
38
+ },
39
+ {
40
+ "name": "主机",
41
+ "seq": 1,
42
+ "code": "var_host",
43
+ "hide": 0,
44
+ "multiple": false,
45
+ "includeStar": true,
46
+ "valueSort": "desc",
47
+ "extend": {
48
+ "originalType": "query",
49
+ "starMeaning": "*",
50
+ "refresh": 1,
51
+ "skipUrlSync": false,
52
+ "sort": 0
53
+ },
54
+ "datasource": "dataflux",
55
+ "type": "PROMQL_QUERY",
56
+ "definition": {
57
+ "tag": "",
58
+ "field": "",
59
+ "value": "",
60
+ "metric": "",
61
+ "object": "",
62
+ "defaultVal": {
63
+ "label": "all values",
64
+ "value": "__all__"
65
+ }
66
+ }
67
+ }
68
+ ],
69
+ "charts": [
70
+ {
71
+ "name": "Panel Title",
72
+ "type": "sequence",
73
+ "group": {
74
+ "name": null
75
+ },
76
+ "pos": {
77
+ "x": 0,
78
+ "y": 0.5,
79
+ "w": 12,
80
+ "h": 15.3
81
+ },
82
+ "extend": {
83
+ "settings": {
84
+ "showTitle": true,
85
+ "titleDesc": "",
86
+ "isSampling": true,
87
+ "changeWorkspace": false,
88
+ "showFieldMapping": false,
89
+ "openThousandsSeparator": true,
90
+ "precision": "2",
91
+ "timeInterval": "auto",
92
+ "fixedTime": "",
93
+ "maxPointCount": null,
94
+ "showLegend": true,
95
+ "legendPostion": "bottom",
96
+ "showLine": true,
97
+ "lineType": "linear",
98
+ "connectNulls": false,
99
+ "openStack": false,
100
+ "stackType": "time",
101
+ "chartType": "line",
102
+ "isTimeInterval": true,
103
+ "xAxisShowType": "time",
104
+ "levels": [
105
+ {
106
+ "title": "Level 1",
107
+ "value": 0,
108
+ "bgColor": "green"
109
+ },
110
+ {
111
+ "title": "Level 2",
112
+ "value": 80,
113
+ "bgColor": "red"
114
+ }
115
+ ],
116
+ "mainMeasurementQueryCode": "A",
117
+ "extend": {
118
+ "appearance": {
119
+ "lineWidth": 1,
120
+ "fillOpacity": 0,
121
+ "gradientMode": "none",
122
+ "pointMode": "auto",
123
+ "axisPlacement": "auto",
124
+ "scaleDistribution": {
125
+ "type": "linear"
126
+ },
127
+ "drawStyle": "line"
128
+ }
129
+ }
130
+ },
131
+ "sourcePanelType": "timeseries",
132
+ "sourcePanelId": 16,
133
+ "grafana": {
134
+ "fieldConfig": {
135
+ "defaults": {
136
+ "color": {
137
+ "mode": "palette-classic"
138
+ },
139
+ "custom": {
140
+ "axisCenteredZero": false,
141
+ "axisColorMode": "text",
142
+ "axisLabel": "",
143
+ "axisPlacement": "auto",
144
+ "barAlignment": 0,
145
+ "drawStyle": "line",
146
+ "fillOpacity": 0,
147
+ "gradientMode": "none",
148
+ "hideFrom": {
149
+ "legend": false,
150
+ "tooltip": false,
151
+ "viz": false
152
+ },
153
+ "lineInterpolation": "linear",
154
+ "lineWidth": 1,
155
+ "pointSize": 5,
156
+ "scaleDistribution": {
157
+ "type": "linear"
158
+ },
159
+ "showPoints": "auto",
160
+ "spanNulls": false,
161
+ "stacking": {
162
+ "group": "A",
163
+ "mode": "none"
164
+ },
165
+ "thresholdsStyle": {
166
+ "mode": "off"
167
+ }
168
+ },
169
+ "thresholds": {
170
+ "mode": "absolute",
171
+ "steps": [
172
+ {
173
+ "color": "green",
174
+ "value": null
175
+ },
176
+ {
177
+ "color": "red",
178
+ "value": 80
179
+ }
180
+ ]
181
+ }
182
+ }
183
+ },
184
+ "options": {
185
+ "legend": {
186
+ "displayMode": "list",
187
+ "placement": "bottom",
188
+ "showLegend": true
189
+ },
190
+ "tooltip": {
191
+ "mode": "single",
192
+ "sort": "none"
193
+ }
194
+ },
195
+ "datasource": {
196
+ "type": "guance-guance-datasource",
197
+ "uid": "o9PpQVUHz"
198
+ }
199
+ }
200
+ },
201
+ "queries": [
202
+ {
203
+ "name": "",
204
+ "type": "sequence",
205
+ "qtype": "dql",
206
+ "datasource": "dataflux",
207
+ "disabled": false,
208
+ "query": {
209
+ "q": "M::datadog:(avg(`dogstatsd_client_aggregated_context`)) BY `host`",
210
+ "code": "A",
211
+ "type": "dql",
212
+ "alias": ""
213
+ },
214
+ "extend": {
215
+ "refId": "A",
216
+ "datasource": {
217
+ "type": "guance-guance-datasource",
218
+ "uid": "o9PpQVUHz"
219
+ },
220
+ "datasourceType": "guance-guance-datasource"
221
+ }
222
+ }
223
+ ]
224
+ },
225
+ {
226
+ "name": "Panel Title",
227
+ "type": "sequence",
228
+ "group": {
229
+ "name": null
230
+ },
231
+ "pos": {
232
+ "x": 12,
233
+ "y": 0.5,
234
+ "w": 12,
235
+ "h": 15.3
236
+ },
237
+ "extend": {
238
+ "settings": {
239
+ "showTitle": true,
240
+ "titleDesc": "",
241
+ "isSampling": true,
242
+ "changeWorkspace": false,
243
+ "showFieldMapping": false,
244
+ "openThousandsSeparator": true,
245
+ "precision": "2",
246
+ "timeInterval": "auto",
247
+ "fixedTime": "",
248
+ "maxPointCount": null,
249
+ "showLegend": true,
250
+ "legendPostion": "bottom",
251
+ "showLine": true,
252
+ "lineType": "linear",
253
+ "connectNulls": false,
254
+ "openStack": false,
255
+ "stackType": "time",
256
+ "chartType": "line",
257
+ "isTimeInterval": true,
258
+ "xAxisShowType": "time",
259
+ "levels": [
260
+ {
261
+ "title": "Level 1",
262
+ "value": 0,
263
+ "bgColor": "green"
264
+ },
265
+ {
266
+ "title": "Level 2",
267
+ "value": 80,
268
+ "bgColor": "red"
269
+ }
270
+ ],
271
+ "alias": [
272
+ {
273
+ "alias": "add",
274
+ "key": "A",
275
+ "name": "A"
276
+ }
277
+ ],
278
+ "mainMeasurementQueryCode": "A",
279
+ "extend": {
280
+ "appearance": {
281
+ "lineWidth": 1,
282
+ "fillOpacity": 0,
283
+ "gradientMode": "none",
284
+ "pointMode": "auto",
285
+ "axisPlacement": "auto",
286
+ "scaleDistribution": {
287
+ "type": "linear"
288
+ },
289
+ "drawStyle": "line"
290
+ }
291
+ }
292
+ },
293
+ "sourcePanelType": "timeseries",
294
+ "sourcePanelId": 14,
295
+ "grafana": {
296
+ "fieldConfig": {
297
+ "defaults": {
298
+ "color": {
299
+ "mode": "palette-classic"
300
+ },
301
+ "custom": {
302
+ "axisCenteredZero": false,
303
+ "axisColorMode": "text",
304
+ "axisLabel": "",
305
+ "axisPlacement": "auto",
306
+ "barAlignment": 0,
307
+ "drawStyle": "line",
308
+ "fillOpacity": 0,
309
+ "gradientMode": "none",
310
+ "hideFrom": {
311
+ "legend": false,
312
+ "tooltip": false,
313
+ "viz": false
314
+ },
315
+ "lineInterpolation": "linear",
316
+ "lineWidth": 1,
317
+ "pointSize": 5,
318
+ "scaleDistribution": {
319
+ "type": "linear"
320
+ },
321
+ "showPoints": "auto",
322
+ "spanNulls": false,
323
+ "stacking": {
324
+ "group": "A",
325
+ "mode": "none"
326
+ },
327
+ "thresholdsStyle": {
328
+ "mode": "off"
329
+ }
330
+ },
331
+ "thresholds": {
332
+ "mode": "absolute",
333
+ "steps": [
334
+ {
335
+ "color": "green",
336
+ "value": null
337
+ },
338
+ {
339
+ "color": "red",
340
+ "value": 80
341
+ }
342
+ ]
343
+ }
344
+ }
345
+ },
346
+ "options": {
347
+ "legend": {
348
+ "displayMode": "list",
349
+ "placement": "bottom",
350
+ "showLegend": true
351
+ },
352
+ "tooltip": {
353
+ "mode": "single",
354
+ "sort": "none"
355
+ }
356
+ },
357
+ "datasource": {
358
+ "type": "guance-guance-datasource",
359
+ "uid": "o9PpQVUHz"
360
+ }
361
+ }
362
+ },
363
+ "queries": [
364
+ {
365
+ "name": "add",
366
+ "type": "sequence",
367
+ "qtype": "dql",
368
+ "datasource": "dataflux",
369
+ "disabled": false,
370
+ "query": {
371
+ "q": "M::`cpu`:(avg(`load5s`)) by host",
372
+ "code": "A",
373
+ "type": "dql",
374
+ "alias": "add"
375
+ },
376
+ "extend": {
377
+ "refId": "A",
378
+ "datasource": {
379
+ "type": "guance-guance-datasource",
380
+ "uid": "o9PpQVUHz"
381
+ },
382
+ "datasourceType": "guance-guance-datasource"
383
+ }
384
+ }
385
+ ]
386
+ },
387
+ {
388
+ "name": "Panel Title",
389
+ "type": "sequence",
390
+ "group": {
391
+ "name": null
392
+ },
393
+ "pos": {
394
+ "x": 0,
395
+ "y": 15.7,
396
+ "w": 12,
397
+ "h": 15.3
398
+ },
399
+ "extend": {
400
+ "settings": {
401
+ "showTitle": true,
402
+ "titleDesc": "",
403
+ "isSampling": true,
404
+ "changeWorkspace": false,
405
+ "showFieldMapping": false,
406
+ "openThousandsSeparator": true,
407
+ "precision": "2",
408
+ "timeInterval": "auto",
409
+ "fixedTime": "",
410
+ "maxPointCount": null,
411
+ "showLegend": true,
412
+ "legendPostion": "bottom",
413
+ "showLine": true,
414
+ "lineType": "linear",
415
+ "connectNulls": false,
416
+ "openStack": false,
417
+ "stackType": "time",
418
+ "chartType": "line",
419
+ "isTimeInterval": true,
420
+ "xAxisShowType": "time",
421
+ "levels": [
422
+ {
423
+ "title": "Level 1",
424
+ "value": 0,
425
+ "bgColor": "green"
426
+ },
427
+ {
428
+ "title": "Level 2",
429
+ "value": 80,
430
+ "bgColor": "red"
431
+ }
432
+ ],
433
+ "mainMeasurementQueryCode": "A",
434
+ "extend": {
435
+ "appearance": {
436
+ "lineWidth": 1,
437
+ "fillOpacity": 0,
438
+ "gradientMode": "none",
439
+ "pointMode": "auto",
440
+ "axisPlacement": "auto",
441
+ "scaleDistribution": {
442
+ "type": "linear"
443
+ },
444
+ "drawStyle": "line"
445
+ }
446
+ }
447
+ },
448
+ "sourcePanelType": "timeseries",
449
+ "sourcePanelId": 8,
450
+ "pluginVersion": "9.3.8",
451
+ "grafana": {
452
+ "fieldConfig": {
453
+ "defaults": {
454
+ "color": {
455
+ "mode": "palette-classic"
456
+ },
457
+ "custom": {
458
+ "axisCenteredZero": false,
459
+ "axisColorMode": "text",
460
+ "axisLabel": "",
461
+ "axisPlacement": "auto",
462
+ "barAlignment": 0,
463
+ "drawStyle": "line",
464
+ "fillOpacity": 0,
465
+ "gradientMode": "none",
466
+ "hideFrom": {
467
+ "legend": false,
468
+ "tooltip": false,
469
+ "viz": false
470
+ },
471
+ "lineInterpolation": "linear",
472
+ "lineWidth": 1,
473
+ "pointSize": 5,
474
+ "scaleDistribution": {
475
+ "type": "linear"
476
+ },
477
+ "showPoints": "auto",
478
+ "spanNulls": false,
479
+ "stacking": {
480
+ "group": "A",
481
+ "mode": "none"
482
+ },
483
+ "thresholdsStyle": {
484
+ "mode": "off"
485
+ }
486
+ },
487
+ "thresholds": {
488
+ "mode": "absolute",
489
+ "steps": [
490
+ {
491
+ "color": "green",
492
+ "value": null
493
+ },
494
+ {
495
+ "color": "red",
496
+ "value": 80
497
+ }
498
+ ]
499
+ }
500
+ }
501
+ },
502
+ "options": {
503
+ "legend": {
504
+ "displayMode": "list",
505
+ "placement": "bottom",
506
+ "showLegend": true
507
+ },
508
+ "tooltip": {
509
+ "mode": "single",
510
+ "sort": "none"
511
+ }
512
+ },
513
+ "datasource": {
514
+ "type": "guance-guance-datasource",
515
+ "uid": "o9PpQVUHz"
516
+ }
517
+ }
518
+ },
519
+ "queries": [
520
+ {
521
+ "name": "",
522
+ "type": "sequence",
523
+ "qtype": "promql",
524
+ "datasource": "dataflux",
525
+ "disabled": false,
526
+ "query": {
527
+ "q": "avg(cpu:load5s) by (region)",
528
+ "code": "A",
529
+ "type": "promql",
530
+ "promqlCode": 1,
531
+ "alias": ""
532
+ },
533
+ "extend": {
534
+ "refId": "A",
535
+ "datasource": {
536
+ "type": "guance-guance-datasource",
537
+ "uid": "o9PpQVUHz"
538
+ },
539
+ "datasourceType": "guance-guance-datasource"
540
+ }
541
+ }
542
+ ]
543
+ },
544
+ {
545
+ "name": "Panel Title",
546
+ "type": "sequence",
547
+ "group": {
548
+ "name": null
549
+ },
550
+ "pos": {
551
+ "x": 12,
552
+ "y": 15.7,
553
+ "w": 12,
554
+ "h": 15.3
555
+ },
556
+ "extend": {
557
+ "settings": {
558
+ "showTitle": true,
559
+ "titleDesc": "",
560
+ "isSampling": true,
561
+ "changeWorkspace": false,
562
+ "showFieldMapping": false,
563
+ "openThousandsSeparator": true,
564
+ "precision": "2",
565
+ "timeInterval": "auto",
566
+ "fixedTime": "",
567
+ "maxPointCount": null,
568
+ "showLegend": true,
569
+ "legendPostion": "bottom",
570
+ "showLine": true,
571
+ "lineType": "linear",
572
+ "connectNulls": false,
573
+ "openStack": false,
574
+ "stackType": "time",
575
+ "chartType": "line",
576
+ "isTimeInterval": true,
577
+ "xAxisShowType": "time",
578
+ "levels": [
579
+ {
580
+ "title": "Level 1",
581
+ "value": 0,
582
+ "bgColor": "green"
583
+ },
584
+ {
585
+ "title": "Level 2",
586
+ "value": 80,
587
+ "bgColor": "red"
588
+ }
589
+ ],
590
+ "alias": [
591
+ {
592
+ "alias": "test别别别别别别别别别名别别别别名别别别别别别别别别名 {{host}}---------{{region}} ",
593
+ "key": "A",
594
+ "name": "A"
595
+ }
596
+ ],
597
+ "mainMeasurementQueryCode": "A",
598
+ "extend": {
599
+ "appearance": {
600
+ "lineWidth": 1,
601
+ "fillOpacity": 0,
602
+ "gradientMode": "none",
603
+ "pointMode": "auto",
604
+ "axisPlacement": "auto",
605
+ "scaleDistribution": {
606
+ "type": "linear"
607
+ },
608
+ "drawStyle": "line"
609
+ }
610
+ }
611
+ },
612
+ "sourcePanelType": "timeseries",
613
+ "sourcePanelId": 6,
614
+ "grafana": {
615
+ "fieldConfig": {
616
+ "defaults": {
617
+ "color": {
618
+ "mode": "palette-classic"
619
+ },
620
+ "custom": {
621
+ "axisCenteredZero": false,
622
+ "axisColorMode": "text",
623
+ "axisLabel": "",
624
+ "axisPlacement": "auto",
625
+ "barAlignment": 0,
626
+ "drawStyle": "line",
627
+ "fillOpacity": 0,
628
+ "gradientMode": "none",
629
+ "hideFrom": {
630
+ "legend": false,
631
+ "tooltip": false,
632
+ "viz": false
633
+ },
634
+ "lineInterpolation": "linear",
635
+ "lineWidth": 1,
636
+ "pointSize": 5,
637
+ "scaleDistribution": {
638
+ "type": "linear"
639
+ },
640
+ "showPoints": "auto",
641
+ "spanNulls": false,
642
+ "stacking": {
643
+ "group": "A",
644
+ "mode": "none"
645
+ },
646
+ "thresholdsStyle": {
647
+ "mode": "off"
648
+ }
649
+ },
650
+ "thresholds": {
651
+ "mode": "absolute",
652
+ "steps": [
653
+ {
654
+ "color": "green",
655
+ "value": null
656
+ },
657
+ {
658
+ "color": "red",
659
+ "value": 80
660
+ }
661
+ ]
662
+ }
663
+ }
664
+ },
665
+ "options": {
666
+ "legend": {
667
+ "displayMode": "list",
668
+ "placement": "bottom",
669
+ "showLegend": true
670
+ },
671
+ "tooltip": {
672
+ "mode": "single",
673
+ "sort": "none"
674
+ }
675
+ },
676
+ "datasource": {
677
+ "type": "guance-guance-datasource",
678
+ "uid": "o9PpQVUHz"
679
+ }
680
+ }
681
+ },
682
+ "queries": [
683
+ {
684
+ "name": "test别别别别别别别别别名别别别别名别别别别别别别别别名 {{host}}---------{{region}} ",
685
+ "type": "sequence",
686
+ "qtype": "promql",
687
+ "datasource": "dataflux",
688
+ "disabled": false,
689
+ "query": {
690
+ "q": "avg(cpu:load5s) by (host,region)",
691
+ "code": "A",
692
+ "type": "promql",
693
+ "promqlCode": 1,
694
+ "alias": "test别别别别别别别别别名别别别别名别别别别别别别别别名 {{host}}---------{{region}} "
695
+ },
696
+ "extend": {
697
+ "refId": "A",
698
+ "datasource": {
699
+ "type": "guance-guance-datasource",
700
+ "uid": "o9PpQVUHz"
701
+ },
702
+ "datasourceType": "guance-guance-datasource"
703
+ }
704
+ }
705
+ ]
706
+ },
707
+ {
708
+ "name": "Panel Title",
709
+ "type": "sequence",
710
+ "group": {
711
+ "name": null
712
+ },
713
+ "pos": {
714
+ "x": 0,
715
+ "y": 30.9,
716
+ "w": 12,
717
+ "h": 17.2
718
+ },
719
+ "extend": {
720
+ "settings": {
721
+ "showTitle": true,
722
+ "titleDesc": "",
723
+ "isSampling": true,
724
+ "changeWorkspace": false,
725
+ "showFieldMapping": false,
726
+ "openThousandsSeparator": true,
727
+ "precision": "2",
728
+ "timeInterval": "auto",
729
+ "fixedTime": "",
730
+ "maxPointCount": null,
731
+ "showLegend": true,
732
+ "legendPostion": "bottom",
733
+ "showLine": true,
734
+ "lineType": "linear",
735
+ "connectNulls": false,
736
+ "openStack": false,
737
+ "stackType": "time",
738
+ "chartType": "line",
739
+ "isTimeInterval": true,
740
+ "xAxisShowType": "time",
741
+ "levels": [
742
+ {
743
+ "title": "Level 1",
744
+ "value": 0,
745
+ "bgColor": "green"
746
+ },
747
+ {
748
+ "title": "Level 2",
749
+ "value": 80,
750
+ "bgColor": "red"
751
+ }
752
+ ],
753
+ "alias": [
754
+ {
755
+ "alias": "别名123+test {{host}}",
756
+ "key": "A",
757
+ "name": "A"
758
+ }
759
+ ],
760
+ "mainMeasurementQueryCode": "A",
761
+ "extend": {
762
+ "appearance": {
763
+ "lineWidth": 1,
764
+ "fillOpacity": 0,
765
+ "gradientMode": "none",
766
+ "pointMode": "auto",
767
+ "axisPlacement": "auto",
768
+ "scaleDistribution": {
769
+ "type": "linear"
770
+ },
771
+ "drawStyle": "line"
772
+ }
773
+ }
774
+ },
775
+ "sourcePanelType": "timeseries",
776
+ "sourcePanelId": 2,
777
+ "grafana": {
778
+ "fieldConfig": {
779
+ "defaults": {
780
+ "color": {
781
+ "mode": "palette-classic"
782
+ },
783
+ "custom": {
784
+ "axisCenteredZero": false,
785
+ "axisColorMode": "text",
786
+ "axisLabel": "",
787
+ "axisPlacement": "auto",
788
+ "barAlignment": 0,
789
+ "drawStyle": "line",
790
+ "fillOpacity": 0,
791
+ "gradientMode": "none",
792
+ "hideFrom": {
793
+ "legend": false,
794
+ "tooltip": false,
795
+ "viz": false
796
+ },
797
+ "lineInterpolation": "linear",
798
+ "lineWidth": 1,
799
+ "pointSize": 5,
800
+ "scaleDistribution": {
801
+ "type": "linear"
802
+ },
803
+ "showPoints": "auto",
804
+ "spanNulls": false,
805
+ "stacking": {
806
+ "group": "A",
807
+ "mode": "none"
808
+ },
809
+ "thresholdsStyle": {
810
+ "mode": "off"
811
+ }
812
+ },
813
+ "thresholds": {
814
+ "mode": "absolute",
815
+ "steps": [
816
+ {
817
+ "color": "green",
818
+ "value": null
819
+ },
820
+ {
821
+ "color": "red",
822
+ "value": 80
823
+ }
824
+ ]
825
+ }
826
+ }
827
+ },
828
+ "options": {
829
+ "legend": {
830
+ "displayMode": "list",
831
+ "placement": "bottom",
832
+ "showLegend": true
833
+ },
834
+ "tooltip": {
835
+ "mode": "single",
836
+ "sort": "none"
837
+ }
838
+ },
839
+ "datasource": {
840
+ "type": "guance-guance-datasource",
841
+ "uid": "-HcExU8Hk"
842
+ }
843
+ }
844
+ },
845
+ "queries": [
846
+ {
847
+ "name": "别名123+test {{host}}",
848
+ "type": "sequence",
849
+ "qtype": "dql",
850
+ "datasource": "dataflux",
851
+ "disabled": false,
852
+ "query": {
853
+ "q": "M::disk:(avg(`free`)) BY `host`",
854
+ "code": "A",
855
+ "type": "dql",
856
+ "alias": "别名123+test {{host}}"
857
+ },
858
+ "extend": {
859
+ "refId": "A",
860
+ "datasource": {
861
+ "type": "guance-guance-datasource",
862
+ "uid": "-HcExU8Hk"
863
+ },
864
+ "datasourceType": "guance-guance-datasource"
865
+ }
866
+ }
867
+ ]
868
+ },
869
+ {
870
+ "name": "Panel Title",
871
+ "type": "sequence",
872
+ "group": {
873
+ "name": null
874
+ },
875
+ "pos": {
876
+ "x": 12,
877
+ "y": 30.9,
878
+ "w": 12,
879
+ "h": 15.3
880
+ },
881
+ "extend": {
882
+ "settings": {
883
+ "showTitle": true,
884
+ "titleDesc": "",
885
+ "isSampling": true,
886
+ "changeWorkspace": false,
887
+ "showFieldMapping": false,
888
+ "openThousandsSeparator": true,
889
+ "precision": "2",
890
+ "timeInterval": "auto",
891
+ "fixedTime": "",
892
+ "maxPointCount": null,
893
+ "showLegend": true,
894
+ "legendPostion": "bottom",
895
+ "showLine": true,
896
+ "lineType": "linear",
897
+ "connectNulls": false,
898
+ "openStack": false,
899
+ "stackType": "time",
900
+ "chartType": "line",
901
+ "isTimeInterval": true,
902
+ "xAxisShowType": "time",
903
+ "levels": [
904
+ {
905
+ "title": "Level 1",
906
+ "value": 0,
907
+ "bgColor": "green"
908
+ },
909
+ {
910
+ "title": "Level 2",
911
+ "value": 80,
912
+ "bgColor": "red"
913
+ }
914
+ ],
915
+ "mainMeasurementQueryCode": "A",
916
+ "extend": {
917
+ "appearance": {
918
+ "lineWidth": 1,
919
+ "fillOpacity": 0,
920
+ "gradientMode": "none",
921
+ "pointMode": "auto",
922
+ "axisPlacement": "auto",
923
+ "scaleDistribution": {
924
+ "type": "linear"
925
+ },
926
+ "drawStyle": "line"
927
+ }
928
+ }
929
+ },
930
+ "sourcePanelType": "timeseries",
931
+ "sourcePanelId": 18,
932
+ "grafana": {
933
+ "fieldConfig": {
934
+ "defaults": {
935
+ "color": {
936
+ "mode": "palette-classic"
937
+ },
938
+ "custom": {
939
+ "axisCenteredZero": false,
940
+ "axisColorMode": "text",
941
+ "axisLabel": "",
942
+ "axisPlacement": "auto",
943
+ "barAlignment": 0,
944
+ "drawStyle": "line",
945
+ "fillOpacity": 0,
946
+ "gradientMode": "none",
947
+ "hideFrom": {
948
+ "legend": false,
949
+ "tooltip": false,
950
+ "viz": false
951
+ },
952
+ "lineInterpolation": "linear",
953
+ "lineWidth": 1,
954
+ "pointSize": 5,
955
+ "scaleDistribution": {
956
+ "type": "linear"
957
+ },
958
+ "showPoints": "auto",
959
+ "spanNulls": false,
960
+ "stacking": {
961
+ "group": "A",
962
+ "mode": "none"
963
+ },
964
+ "thresholdsStyle": {
965
+ "mode": "off"
966
+ }
967
+ },
968
+ "thresholds": {
969
+ "mode": "absolute",
970
+ "steps": [
971
+ {
972
+ "color": "green",
973
+ "value": null
974
+ },
975
+ {
976
+ "color": "red",
977
+ "value": 80
978
+ }
979
+ ]
980
+ }
981
+ }
982
+ },
983
+ "options": {
984
+ "legend": {
985
+ "displayMode": "list",
986
+ "placement": "bottom",
987
+ "showLegend": true
988
+ },
989
+ "tooltip": {
990
+ "mode": "single",
991
+ "sort": "none"
992
+ }
993
+ },
994
+ "datasource": {
995
+ "type": "guance-guance-datasource",
996
+ "uid": "o9PpQVUHz"
997
+ }
998
+ }
999
+ },
1000
+ "queries": [
1001
+ {
1002
+ "name": "",
1003
+ "type": "sequence",
1004
+ "qtype": "dql",
1005
+ "datasource": "dataflux",
1006
+ "disabled": false,
1007
+ "query": {
1008
+ "q": "M::datadog:(avg(`dogstatsd_client_aggregated_context`), avg(`dogstatsd_client_aggregated_context_by_type`), avg(`dogstatsd_client_bytes_dropped_queue`)) BY `host`",
1009
+ "code": "A",
1010
+ "type": "dql",
1011
+ "alias": ""
1012
+ },
1013
+ "extend": {
1014
+ "refId": "A",
1015
+ "datasource": {
1016
+ "type": "guance-guance-datasource",
1017
+ "uid": "o9PpQVUHz"
1018
+ },
1019
+ "datasourceType": "guance-guance-datasource"
1020
+ }
1021
+ }
1022
+ ]
1023
+ },
1024
+ {
1025
+ "name": "Panel Title",
1026
+ "type": "sequence",
1027
+ "group": {
1028
+ "name": "Row title"
1029
+ },
1030
+ "pos": {
1031
+ "x": 0,
1032
+ "y": 2.4,
1033
+ "w": 12,
1034
+ "h": 15.3
1035
+ },
1036
+ "extend": {
1037
+ "settings": {
1038
+ "showTitle": true,
1039
+ "titleDesc": "",
1040
+ "isSampling": true,
1041
+ "changeWorkspace": false,
1042
+ "showFieldMapping": false,
1043
+ "openThousandsSeparator": true,
1044
+ "precision": "2",
1045
+ "timeInterval": "auto",
1046
+ "fixedTime": "",
1047
+ "maxPointCount": null,
1048
+ "showLegend": true,
1049
+ "legendPostion": "bottom",
1050
+ "showLine": true,
1051
+ "lineType": "linear",
1052
+ "connectNulls": false,
1053
+ "openStack": false,
1054
+ "stackType": "time",
1055
+ "chartType": "line",
1056
+ "isTimeInterval": true,
1057
+ "xAxisShowType": "time",
1058
+ "levels": [
1059
+ {
1060
+ "title": "Level 1",
1061
+ "value": 0,
1062
+ "bgColor": "green"
1063
+ },
1064
+ {
1065
+ "title": "Level 2",
1066
+ "value": 80,
1067
+ "bgColor": "red"
1068
+ }
1069
+ ],
1070
+ "mainMeasurementQueryCode": "A",
1071
+ "extend": {
1072
+ "appearance": {
1073
+ "lineWidth": 1,
1074
+ "fillOpacity": 0,
1075
+ "gradientMode": "none",
1076
+ "pointMode": "auto",
1077
+ "axisPlacement": "auto",
1078
+ "scaleDistribution": {
1079
+ "type": "linear"
1080
+ },
1081
+ "drawStyle": "line"
1082
+ }
1083
+ }
1084
+ },
1085
+ "sourcePanelType": "timeseries",
1086
+ "sourcePanelId": 10,
1087
+ "grafana": {
1088
+ "fieldConfig": {
1089
+ "defaults": {
1090
+ "color": {
1091
+ "mode": "palette-classic"
1092
+ },
1093
+ "custom": {
1094
+ "axisCenteredZero": false,
1095
+ "axisColorMode": "text",
1096
+ "axisLabel": "",
1097
+ "axisPlacement": "auto",
1098
+ "barAlignment": 0,
1099
+ "drawStyle": "line",
1100
+ "fillOpacity": 0,
1101
+ "gradientMode": "none",
1102
+ "hideFrom": {
1103
+ "legend": false,
1104
+ "tooltip": false,
1105
+ "viz": false
1106
+ },
1107
+ "lineInterpolation": "linear",
1108
+ "lineWidth": 1,
1109
+ "pointSize": 5,
1110
+ "scaleDistribution": {
1111
+ "type": "linear"
1112
+ },
1113
+ "showPoints": "auto",
1114
+ "spanNulls": false,
1115
+ "stacking": {
1116
+ "group": "A",
1117
+ "mode": "none"
1118
+ },
1119
+ "thresholdsStyle": {
1120
+ "mode": "off"
1121
+ }
1122
+ },
1123
+ "thresholds": {
1124
+ "mode": "absolute",
1125
+ "steps": [
1126
+ {
1127
+ "color": "green",
1128
+ "value": null
1129
+ },
1130
+ {
1131
+ "color": "red",
1132
+ "value": 80
1133
+ }
1134
+ ]
1135
+ }
1136
+ }
1137
+ },
1138
+ "options": {
1139
+ "legend": {
1140
+ "displayMode": "list",
1141
+ "placement": "bottom",
1142
+ "showLegend": true
1143
+ },
1144
+ "tooltip": {
1145
+ "mode": "single",
1146
+ "sort": "none"
1147
+ }
1148
+ },
1149
+ "datasource": {
1150
+ "type": "guance-guance-datasource",
1151
+ "uid": "o9PpQVUHz"
1152
+ }
1153
+ }
1154
+ },
1155
+ "queries": [
1156
+ {
1157
+ "name": "",
1158
+ "type": "sequence",
1159
+ "qtype": "promql",
1160
+ "datasource": "dataflux",
1161
+ "disabled": false,
1162
+ "query": {
1163
+ "q": "(sum(rate(container_cpu_usage_seconds_total{ pod=~\"act-internal-tool-v00001600-5d78984d9f-v5gpj|act-internal-tool-v00001694-6c78897c97-j9b9g|act-internal-tool-v00001694-6c78897c97-whjkb\", image!=\"\", cluster_name_k8s=~\".*\", namespace=~\"act|agent|apisix|asset|com|crm|cswap|datakit|default|devops-operator-system|feed|growth|hivesec|infra|istio-ingress|istio-system|kirin|kube-system|liquidity|risk|spot|std|str|swap|wealth|web|web3\"}[1m]))by(pod,container)) / (sum(kube_pod_container_resource_limits{ pod=~\"act-internal-tool-v00001600-5d78984d9f-v5gpj|act-internal-tool-v00001694-6c78897c97-j9b9g|act-internal-tool-v00001694-6c78897c97-whjkb\", resource=~\"cpu\", cluster_name_k8s=~\".*\", namespace=~\"act|agent|apisix|asset|com|crm|cswap|datakit|default|devops-operator-system|feed|growth|hivesec|infra|istio-ingress|istio-system|kirin|kube-system|liquidity|risk|spot|std|str|swap|wealth|web|web3\"})by(pod,container))",
1164
+ "code": "A",
1165
+ "type": "promql",
1166
+ "promqlCode": 1,
1167
+ "alias": ""
1168
+ },
1169
+ "extend": {
1170
+ "refId": "A",
1171
+ "datasource": {
1172
+ "type": "guance-guance-datasource",
1173
+ "uid": "o9PpQVUHz"
1174
+ },
1175
+ "datasourceType": "guance-guance-datasource"
1176
+ }
1177
+ }
1178
+ ]
1179
+ },
1180
+ {
1181
+ "name": "Panel Title",
1182
+ "type": "sequence",
1183
+ "group": {
1184
+ "name": "Row title"
1185
+ },
1186
+ "pos": {
1187
+ "x": 0,
1188
+ "y": 17.6,
1189
+ "w": 12,
1190
+ "h": 15.3
1191
+ },
1192
+ "extend": {
1193
+ "settings": {
1194
+ "showTitle": true,
1195
+ "titleDesc": "",
1196
+ "isSampling": true,
1197
+ "changeWorkspace": false,
1198
+ "showFieldMapping": false,
1199
+ "openThousandsSeparator": true,
1200
+ "precision": "2",
1201
+ "timeInterval": "auto",
1202
+ "fixedTime": "",
1203
+ "maxPointCount": null,
1204
+ "showLegend": true,
1205
+ "legendPostion": "bottom",
1206
+ "showLine": true,
1207
+ "lineType": "linear",
1208
+ "connectNulls": false,
1209
+ "openStack": false,
1210
+ "stackType": "time",
1211
+ "chartType": "line",
1212
+ "isTimeInterval": true,
1213
+ "xAxisShowType": "time",
1214
+ "levels": [
1215
+ {
1216
+ "title": "Level 1",
1217
+ "value": 0,
1218
+ "bgColor": "green"
1219
+ },
1220
+ {
1221
+ "title": "Level 2",
1222
+ "value": 80,
1223
+ "bgColor": "red"
1224
+ }
1225
+ ],
1226
+ "mainMeasurementQueryCode": "B",
1227
+ "extend": {
1228
+ "appearance": {
1229
+ "lineWidth": 1,
1230
+ "fillOpacity": 0,
1231
+ "gradientMode": "none",
1232
+ "pointMode": "auto",
1233
+ "axisPlacement": "auto",
1234
+ "scaleDistribution": {
1235
+ "type": "linear"
1236
+ },
1237
+ "drawStyle": "line"
1238
+ }
1239
+ }
1240
+ },
1241
+ "sourcePanelType": "timeseries",
1242
+ "sourcePanelId": 4,
1243
+ "grafana": {
1244
+ "fieldConfig": {
1245
+ "defaults": {
1246
+ "color": {
1247
+ "mode": "palette-classic"
1248
+ },
1249
+ "custom": {
1250
+ "axisCenteredZero": false,
1251
+ "axisColorMode": "text",
1252
+ "axisLabel": "",
1253
+ "axisPlacement": "auto",
1254
+ "barAlignment": 0,
1255
+ "drawStyle": "line",
1256
+ "fillOpacity": 0,
1257
+ "gradientMode": "none",
1258
+ "hideFrom": {
1259
+ "legend": false,
1260
+ "tooltip": false,
1261
+ "viz": false
1262
+ },
1263
+ "lineInterpolation": "linear",
1264
+ "lineWidth": 1,
1265
+ "pointSize": 5,
1266
+ "scaleDistribution": {
1267
+ "type": "linear"
1268
+ },
1269
+ "showPoints": "auto",
1270
+ "spanNulls": false,
1271
+ "stacking": {
1272
+ "group": "A",
1273
+ "mode": "none"
1274
+ },
1275
+ "thresholdsStyle": {
1276
+ "mode": "off"
1277
+ }
1278
+ },
1279
+ "thresholds": {
1280
+ "mode": "absolute",
1281
+ "steps": [
1282
+ {
1283
+ "color": "green"
1284
+ },
1285
+ {
1286
+ "color": "red",
1287
+ "value": 80
1288
+ }
1289
+ ]
1290
+ }
1291
+ }
1292
+ },
1293
+ "options": {
1294
+ "legend": {
1295
+ "displayMode": "list",
1296
+ "placement": "bottom",
1297
+ "showLegend": true
1298
+ },
1299
+ "tooltip": {
1300
+ "mode": "single",
1301
+ "sort": "none"
1302
+ }
1303
+ },
1304
+ "datasource": {
1305
+ "type": "guance-guance-datasource",
1306
+ "uid": "2270qUUNz"
1307
+ }
1308
+ }
1309
+ },
1310
+ "queries": [
1311
+ {
1312
+ "name": "",
1313
+ "type": "sequence",
1314
+ "qtype": "dql",
1315
+ "datasource": "dataflux",
1316
+ "disabled": true,
1317
+ "query": {
1318
+ "q": "D::RE(`.*`):(count(`*`))",
1319
+ "code": "B",
1320
+ "type": "dql",
1321
+ "alias": ""
1322
+ },
1323
+ "extend": {
1324
+ "refId": "B",
1325
+ "datasource": {
1326
+ "type": "guance-guance-datasource",
1327
+ "uid": "2270qUUNz"
1328
+ },
1329
+ "datasourceType": "guance-guance-datasource"
1330
+ }
1331
+ },
1332
+ {
1333
+ "name": "",
1334
+ "type": "sequence",
1335
+ "qtype": "dql",
1336
+ "datasource": "dataflux",
1337
+ "disabled": true,
1338
+ "query": {
1339
+ "q": "D::RE(`.*`):(count(`*`))",
1340
+ "code": "A",
1341
+ "type": "dql",
1342
+ "alias": ""
1343
+ },
1344
+ "extend": {
1345
+ "refId": "A",
1346
+ "datasource": {
1347
+ "type": "guance-guance-datasource",
1348
+ "uid": "2270qUUNz"
1349
+ },
1350
+ "datasourceType": "guance-guance-datasource"
1351
+ }
1352
+ },
1353
+ {
1354
+ "name": "",
1355
+ "type": "sequence",
1356
+ "qtype": "dql",
1357
+ "datasource": "dataflux",
1358
+ "disabled": false,
1359
+ "query": {
1360
+ "q": "M::`cpu`:(avg(`load5s`))",
1361
+ "code": "C",
1362
+ "type": "dql",
1363
+ "alias": ""
1364
+ },
1365
+ "extend": {
1366
+ "refId": "C",
1367
+ "datasource": {
1368
+ "type": "guance-guance-datasource",
1369
+ "uid": "2270qUUNz"
1370
+ },
1371
+ "datasourceType": "guance-guance-datasource"
1372
+ }
1373
+ }
1374
+ ]
1375
+ }
1376
+ ],
1377
+ "groups": [
1378
+ {
1379
+ "name": "Row title"
1380
+ }
1381
+ ],
1382
+ "type": "template"
1383
+ }
1384
+ }