@cloudcare/guance-front-tools 1.0.11 → 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 (54) hide show
  1. package/README.md +8 -0
  2. package/guance-all-charts.json +3415 -0
  3. package/lib/cjs/generated/dashboardCharts.d.ts +54 -13
  4. package/lib/cjs/scripts/grafana-covert-to-guance-core.d.ts +4 -0
  5. package/lib/cjs/scripts/grafana-covert-to-guance-core.js +10 -0
  6. package/lib/cjs/scripts/grafana-dashbord.d.ts +2220 -0
  7. package/lib/cjs/scripts/grafana-dashbord.js +4 -0
  8. package/lib/cjs/src/grafana-covert-to-guance.d.ts +2 -0
  9. package/lib/cjs/src/grafana-covert-to-guance.js +5 -0
  10. package/lib/cjs/src/index.d.ts +1 -0
  11. package/lib/cjs/src/index.js +1 -0
  12. package/lib/esm/generated/dashboardCharts.d.ts +54 -13
  13. package/lib/esm/scripts/grafana-covert-to-guance-core.d.ts +4 -0
  14. package/lib/esm/scripts/grafana-covert-to-guance-core.js +7 -0
  15. package/lib/esm/scripts/grafana-dashbord.d.ts +2220 -0
  16. package/lib/esm/scripts/grafana-dashbord.js +1 -0
  17. package/lib/esm/src/grafana-covert-to-guance.d.ts +2 -0
  18. package/lib/esm/src/grafana-covert-to-guance.js +1 -0
  19. package/lib/esm/src/index.d.ts +1 -0
  20. package/lib/esm/src/index.js +1 -0
  21. package/lib/example/grafana2.json +878 -0
  22. package/lib/example/guance-dahs-3.json +348 -0
  23. package/lib/scripts/grafana-covert-to-guance-core.js +7 -0
  24. package/lib/scripts/grafana-covert-to-guance-core.ts +23 -0
  25. package/lib/scripts/grafana-covert-to-guance.js +52 -397
  26. package/lib/scripts/grafana-covert-to-guance.ts +58 -410
  27. package/lib/src/grafana-covert-to-guance.ts +7 -0
  28. package/lib/src/index.ts +1 -0
  29. package/package.json +6 -4
  30. package/schemas/charts/chart-schema.json +8 -5
  31. package/schemas/charts/common/chart-link-item-schema.json +48 -0
  32. package/schemas/charts/common/chart-links-schema.json +9 -0
  33. package/schemas/charts/common/common-chart-types-schema.json +3 -1
  34. package/schemas/charts/dashboard-schema.json +11 -4
  35. package/schemas/charts/query/query-item-schema.json +19 -1
  36. package/schemas/charts/settings/settings-time-schema.json +1 -5
  37. package/schemas/charts/settings/settings-unit-items-schema.json +3 -1
  38. package/schemas/charts/settings/settings-units-schema.json +2 -3
  39. package/scripts/validate-file.mjs +57 -0
  40. package/skills/grafana-to-guance-dashboard/SKILL.md +102 -0
  41. package/skills/grafana-to-guance-dashboard/agents/openai.yaml +4 -0
  42. package/skills/grafana-to-guance-dashboard/references/converter-notes.md +134 -0
  43. package/skills/grafana-to-guance-dashboard/scripts/convert-grafana-dashboard.mjs +1899 -0
  44. package/test/cli.test.mjs +373 -0
  45. package/test-output/grafana2.cli.guance.json +1029 -0
  46. package/test-output/grafana2.guance.json +1029 -0
  47. package/test-output/grafana2.keep-meta.guance.json +1384 -0
  48. package/test-output/pod.guance.json +2153 -0
  49. package/test-output/skill-test2-enhanced.guance.json +21596 -0
  50. package/test-output/skill-test2-validated.guance.json +11610 -0
  51. package/test-output/skill-test2.guance.json +11610 -0
  52. package/test-output/test.guance.json +1086 -0
  53. package/test-output/test2.guance.guance-promql.json +23212 -0
  54. package/test-output/test2.guance.json +17554 -0
@@ -0,0 +1,1029 @@
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": "QUERY",
27
+ "definition": {
28
+ "tag": "",
29
+ "field": "",
30
+ "value": "O::HOST:(distinct('host')){'os'='linux'}[10m]",
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": "label_values(cpu:load5s,host)",
60
+ "metric": "cpu:load5s",
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
+ "pointSize": 5,
124
+ "axisPlacement": "auto",
125
+ "axisColorMode": "text",
126
+ "axisCenteredZero": false,
127
+ "barAlignment": 0,
128
+ "scaleDistribution": {
129
+ "type": "linear"
130
+ },
131
+ "drawStyle": "line",
132
+ "spanNulls": false,
133
+ "stackingGroup": "A",
134
+ "fieldColorMode": "palette-classic",
135
+ "thresholdsMode": "absolute",
136
+ "thresholdsStyleMode": "off",
137
+ "hideFrom": {
138
+ "legend": false,
139
+ "tooltip": false,
140
+ "viz": false
141
+ }
142
+ },
143
+ "legend": {
144
+ "displayMode": "list"
145
+ },
146
+ "tooltip": {
147
+ "mode": "single",
148
+ "sort": "none"
149
+ }
150
+ }
151
+ }
152
+ },
153
+ "queries": [
154
+ {
155
+ "name": "",
156
+ "type": "sequence",
157
+ "qtype": "dql",
158
+ "datasource": "dataflux",
159
+ "disabled": false,
160
+ "query": {
161
+ "q": "M::datadog:(avg(`dogstatsd_client_aggregated_context`)) BY `host`",
162
+ "code": "A",
163
+ "type": "dql",
164
+ "alias": ""
165
+ },
166
+ "extend": {
167
+ "refId": "A",
168
+ "datasource": {
169
+ "type": "guance-guance-datasource",
170
+ "uid": "o9PpQVUHz"
171
+ }
172
+ }
173
+ }
174
+ ]
175
+ },
176
+ {
177
+ "name": "Panel Title",
178
+ "type": "sequence",
179
+ "group": {
180
+ "name": null
181
+ },
182
+ "pos": {
183
+ "x": 12,
184
+ "y": 0.5,
185
+ "w": 12,
186
+ "h": 15.3
187
+ },
188
+ "extend": {
189
+ "settings": {
190
+ "showTitle": true,
191
+ "titleDesc": "",
192
+ "isSampling": true,
193
+ "changeWorkspace": false,
194
+ "showFieldMapping": false,
195
+ "openThousandsSeparator": true,
196
+ "precision": "2",
197
+ "timeInterval": "auto",
198
+ "fixedTime": "",
199
+ "maxPointCount": null,
200
+ "showLegend": true,
201
+ "legendPostion": "bottom",
202
+ "showLine": true,
203
+ "lineType": "linear",
204
+ "connectNulls": false,
205
+ "openStack": false,
206
+ "stackType": "time",
207
+ "chartType": "line",
208
+ "isTimeInterval": true,
209
+ "xAxisShowType": "time",
210
+ "unitType": "global",
211
+ "globalUnit": [
212
+ "custom",
213
+ "short"
214
+ ],
215
+ "levels": [
216
+ {
217
+ "title": "Level 1",
218
+ "value": 0,
219
+ "bgColor": "green"
220
+ },
221
+ {
222
+ "title": "Level 2",
223
+ "value": 80,
224
+ "bgColor": "red"
225
+ }
226
+ ],
227
+ "alias": [
228
+ {
229
+ "alias": "add",
230
+ "key": "A",
231
+ "name": "A"
232
+ }
233
+ ],
234
+ "scientificNotation": true,
235
+ "mainMeasurementQueryCode": "A",
236
+ "extend": {
237
+ "appearance": {
238
+ "lineWidth": 1,
239
+ "fillOpacity": 0,
240
+ "gradientMode": "none",
241
+ "pointMode": "auto",
242
+ "pointSize": 5,
243
+ "axisPlacement": "auto",
244
+ "axisColorMode": "text",
245
+ "axisCenteredZero": false,
246
+ "barAlignment": 0,
247
+ "scaleDistribution": {
248
+ "type": "linear"
249
+ },
250
+ "drawStyle": "line",
251
+ "spanNulls": false,
252
+ "stackingGroup": "A",
253
+ "fieldColorMode": "palette-classic",
254
+ "thresholdsMode": "absolute",
255
+ "thresholdsStyleMode": "off",
256
+ "hideFrom": {
257
+ "legend": false,
258
+ "tooltip": false,
259
+ "viz": false
260
+ }
261
+ },
262
+ "legend": {
263
+ "displayMode": "list"
264
+ },
265
+ "tooltip": {
266
+ "mode": "single",
267
+ "sort": "none"
268
+ }
269
+ }
270
+ }
271
+ },
272
+ "queries": [
273
+ {
274
+ "name": "add",
275
+ "type": "sequence",
276
+ "qtype": "dql",
277
+ "datasource": "dataflux",
278
+ "disabled": false,
279
+ "query": {
280
+ "q": "M::`cpu`:(avg(`load5s`)) by host",
281
+ "code": "A",
282
+ "type": "dql",
283
+ "alias": "add"
284
+ },
285
+ "extend": {
286
+ "refId": "A",
287
+ "datasource": {
288
+ "type": "guance-guance-datasource",
289
+ "uid": "o9PpQVUHz"
290
+ }
291
+ }
292
+ }
293
+ ]
294
+ },
295
+ {
296
+ "name": "Panel Title",
297
+ "type": "sequence",
298
+ "group": {
299
+ "name": null
300
+ },
301
+ "pos": {
302
+ "x": 0,
303
+ "y": 15.7,
304
+ "w": 12,
305
+ "h": 15.3
306
+ },
307
+ "extend": {
308
+ "settings": {
309
+ "showTitle": true,
310
+ "titleDesc": "",
311
+ "isSampling": true,
312
+ "changeWorkspace": false,
313
+ "showFieldMapping": false,
314
+ "openThousandsSeparator": true,
315
+ "precision": "2",
316
+ "timeInterval": "auto",
317
+ "fixedTime": "",
318
+ "maxPointCount": null,
319
+ "showLegend": true,
320
+ "legendPostion": "bottom",
321
+ "showLine": true,
322
+ "lineType": "linear",
323
+ "connectNulls": false,
324
+ "openStack": false,
325
+ "stackType": "time",
326
+ "chartType": "line",
327
+ "isTimeInterval": true,
328
+ "xAxisShowType": "time",
329
+ "unitType": "global",
330
+ "globalUnit": [
331
+ "custom",
332
+ "short"
333
+ ],
334
+ "levels": [
335
+ {
336
+ "title": "Level 1",
337
+ "value": 0,
338
+ "bgColor": "green"
339
+ },
340
+ {
341
+ "title": "Level 2",
342
+ "value": 80,
343
+ "bgColor": "red"
344
+ }
345
+ ],
346
+ "scientificNotation": true,
347
+ "mainMeasurementQueryCode": "A",
348
+ "extend": {
349
+ "appearance": {
350
+ "lineWidth": 1,
351
+ "fillOpacity": 0,
352
+ "gradientMode": "none",
353
+ "pointMode": "auto",
354
+ "pointSize": 5,
355
+ "axisPlacement": "auto",
356
+ "axisColorMode": "text",
357
+ "axisCenteredZero": false,
358
+ "barAlignment": 0,
359
+ "scaleDistribution": {
360
+ "type": "linear"
361
+ },
362
+ "drawStyle": "line",
363
+ "spanNulls": false,
364
+ "stackingGroup": "A",
365
+ "fieldColorMode": "palette-classic",
366
+ "thresholdsMode": "absolute",
367
+ "thresholdsStyleMode": "off",
368
+ "hideFrom": {
369
+ "legend": false,
370
+ "tooltip": false,
371
+ "viz": false
372
+ }
373
+ },
374
+ "legend": {
375
+ "displayMode": "list"
376
+ },
377
+ "tooltip": {
378
+ "mode": "single",
379
+ "sort": "none"
380
+ }
381
+ }
382
+ }
383
+ },
384
+ "queries": [
385
+ {
386
+ "name": "",
387
+ "type": "sequence",
388
+ "qtype": "promql",
389
+ "datasource": "dataflux",
390
+ "disabled": false,
391
+ "query": {
392
+ "q": "avg(cpu:load5s) by (region)",
393
+ "code": "A",
394
+ "type": "promql",
395
+ "promqlCode": 1,
396
+ "alias": ""
397
+ },
398
+ "extend": {
399
+ "refId": "A",
400
+ "datasource": {
401
+ "type": "guance-guance-datasource",
402
+ "uid": "o9PpQVUHz"
403
+ }
404
+ }
405
+ }
406
+ ]
407
+ },
408
+ {
409
+ "name": "Panel Title",
410
+ "type": "sequence",
411
+ "group": {
412
+ "name": null
413
+ },
414
+ "pos": {
415
+ "x": 12,
416
+ "y": 15.7,
417
+ "w": 12,
418
+ "h": 15.3
419
+ },
420
+ "extend": {
421
+ "settings": {
422
+ "showTitle": true,
423
+ "titleDesc": "",
424
+ "isSampling": true,
425
+ "changeWorkspace": false,
426
+ "showFieldMapping": false,
427
+ "openThousandsSeparator": true,
428
+ "precision": "2",
429
+ "timeInterval": "auto",
430
+ "fixedTime": "",
431
+ "maxPointCount": null,
432
+ "showLegend": true,
433
+ "legendPostion": "bottom",
434
+ "showLine": true,
435
+ "lineType": "linear",
436
+ "connectNulls": false,
437
+ "openStack": false,
438
+ "stackType": "time",
439
+ "chartType": "line",
440
+ "isTimeInterval": true,
441
+ "xAxisShowType": "time",
442
+ "unitType": "global",
443
+ "globalUnit": [
444
+ "custom",
445
+ "short"
446
+ ],
447
+ "levels": [
448
+ {
449
+ "title": "Level 1",
450
+ "value": 0,
451
+ "bgColor": "green"
452
+ },
453
+ {
454
+ "title": "Level 2",
455
+ "value": 80,
456
+ "bgColor": "red"
457
+ }
458
+ ],
459
+ "alias": [
460
+ {
461
+ "alias": "test别别别别别别别别别名别别别别名别别别别别别别别别名 {{host}}---------{{region}} ",
462
+ "key": "A",
463
+ "name": "A"
464
+ }
465
+ ],
466
+ "scientificNotation": true,
467
+ "mainMeasurementQueryCode": "A",
468
+ "extend": {
469
+ "appearance": {
470
+ "lineWidth": 1,
471
+ "fillOpacity": 0,
472
+ "gradientMode": "none",
473
+ "pointMode": "auto",
474
+ "pointSize": 5,
475
+ "axisPlacement": "auto",
476
+ "axisColorMode": "text",
477
+ "axisCenteredZero": false,
478
+ "barAlignment": 0,
479
+ "scaleDistribution": {
480
+ "type": "linear"
481
+ },
482
+ "drawStyle": "line",
483
+ "spanNulls": false,
484
+ "stackingGroup": "A",
485
+ "fieldColorMode": "palette-classic",
486
+ "thresholdsMode": "absolute",
487
+ "thresholdsStyleMode": "off",
488
+ "hideFrom": {
489
+ "legend": false,
490
+ "tooltip": false,
491
+ "viz": false
492
+ }
493
+ },
494
+ "legend": {
495
+ "displayMode": "list"
496
+ },
497
+ "tooltip": {
498
+ "mode": "single",
499
+ "sort": "none"
500
+ }
501
+ }
502
+ }
503
+ },
504
+ "queries": [
505
+ {
506
+ "name": "test别别别别别别别别别名别别别别名别别别别别别别别别名 {{host}}---------{{region}} ",
507
+ "type": "sequence",
508
+ "qtype": "promql",
509
+ "datasource": "dataflux",
510
+ "disabled": false,
511
+ "query": {
512
+ "q": "avg(cpu:load5s) by (host,region)",
513
+ "code": "A",
514
+ "type": "promql",
515
+ "promqlCode": 1,
516
+ "alias": "test别别别别别别别别别名别别别别名别别别别别别别别别名 {{host}}---------{{region}} "
517
+ },
518
+ "extend": {
519
+ "refId": "A",
520
+ "datasource": {
521
+ "type": "guance-guance-datasource",
522
+ "uid": "o9PpQVUHz"
523
+ }
524
+ }
525
+ }
526
+ ]
527
+ },
528
+ {
529
+ "name": "Panel Title",
530
+ "type": "sequence",
531
+ "group": {
532
+ "name": null
533
+ },
534
+ "pos": {
535
+ "x": 0,
536
+ "y": 30.9,
537
+ "w": 12,
538
+ "h": 17.2
539
+ },
540
+ "extend": {
541
+ "settings": {
542
+ "showTitle": true,
543
+ "titleDesc": "",
544
+ "isSampling": true,
545
+ "changeWorkspace": false,
546
+ "showFieldMapping": false,
547
+ "openThousandsSeparator": true,
548
+ "precision": "2",
549
+ "timeInterval": "auto",
550
+ "fixedTime": "",
551
+ "maxPointCount": null,
552
+ "showLegend": true,
553
+ "legendPostion": "bottom",
554
+ "showLine": true,
555
+ "lineType": "linear",
556
+ "connectNulls": false,
557
+ "openStack": false,
558
+ "stackType": "time",
559
+ "chartType": "line",
560
+ "isTimeInterval": true,
561
+ "xAxisShowType": "time",
562
+ "levels": [
563
+ {
564
+ "title": "Level 1",
565
+ "value": 0,
566
+ "bgColor": "green"
567
+ },
568
+ {
569
+ "title": "Level 2",
570
+ "value": 80,
571
+ "bgColor": "red"
572
+ }
573
+ ],
574
+ "alias": [
575
+ {
576
+ "alias": "别名123+test {{host}}",
577
+ "key": "A",
578
+ "name": "A"
579
+ }
580
+ ],
581
+ "mainMeasurementQueryCode": "A",
582
+ "extend": {
583
+ "appearance": {
584
+ "lineWidth": 1,
585
+ "fillOpacity": 0,
586
+ "gradientMode": "none",
587
+ "pointMode": "auto",
588
+ "pointSize": 5,
589
+ "axisPlacement": "auto",
590
+ "axisColorMode": "text",
591
+ "axisCenteredZero": false,
592
+ "barAlignment": 0,
593
+ "scaleDistribution": {
594
+ "type": "linear"
595
+ },
596
+ "drawStyle": "line",
597
+ "spanNulls": false,
598
+ "stackingGroup": "A",
599
+ "fieldColorMode": "palette-classic",
600
+ "thresholdsMode": "absolute",
601
+ "thresholdsStyleMode": "off",
602
+ "hideFrom": {
603
+ "legend": false,
604
+ "tooltip": false,
605
+ "viz": false
606
+ }
607
+ },
608
+ "legend": {
609
+ "displayMode": "list"
610
+ },
611
+ "tooltip": {
612
+ "mode": "single",
613
+ "sort": "none"
614
+ }
615
+ }
616
+ }
617
+ },
618
+ "queries": [
619
+ {
620
+ "name": "别名123+test {{host}}",
621
+ "type": "sequence",
622
+ "qtype": "dql",
623
+ "datasource": "dataflux",
624
+ "disabled": false,
625
+ "query": {
626
+ "q": "M::disk:(avg(`free`)) BY `host`",
627
+ "code": "A",
628
+ "type": "dql",
629
+ "alias": "别名123+test {{host}}"
630
+ },
631
+ "extend": {
632
+ "refId": "A",
633
+ "datasource": {
634
+ "type": "guance-guance-datasource",
635
+ "uid": "-HcExU8Hk"
636
+ }
637
+ }
638
+ }
639
+ ]
640
+ },
641
+ {
642
+ "name": "Panel Title",
643
+ "type": "sequence",
644
+ "group": {
645
+ "name": null
646
+ },
647
+ "pos": {
648
+ "x": 12,
649
+ "y": 30.9,
650
+ "w": 12,
651
+ "h": 15.3
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": true,
666
+ "legendPostion": "bottom",
667
+ "showLine": true,
668
+ "lineType": "linear",
669
+ "connectNulls": false,
670
+ "openStack": false,
671
+ "stackType": "time",
672
+ "chartType": "line",
673
+ "isTimeInterval": true,
674
+ "xAxisShowType": "time",
675
+ "unitType": "global",
676
+ "globalUnit": [
677
+ "custom",
678
+ "none"
679
+ ],
680
+ "levels": [
681
+ {
682
+ "title": "Level 1",
683
+ "value": 0,
684
+ "bgColor": "green"
685
+ },
686
+ {
687
+ "title": "Level 2",
688
+ "value": 80,
689
+ "bgColor": "red"
690
+ }
691
+ ],
692
+ "mainMeasurementQueryCode": "A",
693
+ "extend": {
694
+ "appearance": {
695
+ "lineWidth": 1,
696
+ "fillOpacity": 0,
697
+ "gradientMode": "none",
698
+ "pointMode": "auto",
699
+ "pointSize": 5,
700
+ "axisPlacement": "auto",
701
+ "axisColorMode": "text",
702
+ "axisCenteredZero": false,
703
+ "barAlignment": 0,
704
+ "scaleDistribution": {
705
+ "type": "linear"
706
+ },
707
+ "drawStyle": "line",
708
+ "spanNulls": false,
709
+ "stackingGroup": "A",
710
+ "fieldColorMode": "palette-classic",
711
+ "thresholdsMode": "absolute",
712
+ "thresholdsStyleMode": "off",
713
+ "hideFrom": {
714
+ "legend": false,
715
+ "tooltip": false,
716
+ "viz": false
717
+ }
718
+ },
719
+ "legend": {
720
+ "displayMode": "list"
721
+ },
722
+ "tooltip": {
723
+ "mode": "single",
724
+ "sort": "none"
725
+ }
726
+ }
727
+ }
728
+ },
729
+ "queries": [
730
+ {
731
+ "name": "",
732
+ "type": "sequence",
733
+ "qtype": "dql",
734
+ "datasource": "dataflux",
735
+ "disabled": false,
736
+ "query": {
737
+ "q": "M::datadog:(avg(`dogstatsd_client_aggregated_context`), avg(`dogstatsd_client_aggregated_context_by_type`), avg(`dogstatsd_client_bytes_dropped_queue`)) BY `host`",
738
+ "code": "A",
739
+ "type": "dql",
740
+ "alias": ""
741
+ },
742
+ "extend": {
743
+ "refId": "A",
744
+ "datasource": {
745
+ "type": "guance-guance-datasource",
746
+ "uid": "o9PpQVUHz"
747
+ }
748
+ }
749
+ }
750
+ ]
751
+ },
752
+ {
753
+ "name": "Panel Title",
754
+ "type": "sequence",
755
+ "group": {
756
+ "name": "Row title"
757
+ },
758
+ "pos": {
759
+ "x": 0,
760
+ "y": 2.4,
761
+ "w": 12,
762
+ "h": 15.3
763
+ },
764
+ "extend": {
765
+ "settings": {
766
+ "showTitle": true,
767
+ "titleDesc": "",
768
+ "isSampling": true,
769
+ "changeWorkspace": false,
770
+ "showFieldMapping": false,
771
+ "openThousandsSeparator": true,
772
+ "precision": "2",
773
+ "timeInterval": "auto",
774
+ "fixedTime": "",
775
+ "maxPointCount": null,
776
+ "showLegend": true,
777
+ "legendPostion": "bottom",
778
+ "showLine": true,
779
+ "lineType": "linear",
780
+ "connectNulls": false,
781
+ "openStack": false,
782
+ "stackType": "time",
783
+ "chartType": "line",
784
+ "isTimeInterval": true,
785
+ "xAxisShowType": "time",
786
+ "unitType": "global",
787
+ "globalUnit": [
788
+ "percent",
789
+ "percent"
790
+ ],
791
+ "levels": [
792
+ {
793
+ "title": "Level 1",
794
+ "value": 0,
795
+ "bgColor": "green"
796
+ },
797
+ {
798
+ "title": "Level 2",
799
+ "value": 80,
800
+ "bgColor": "red"
801
+ }
802
+ ],
803
+ "mainMeasurementQueryCode": "A",
804
+ "extend": {
805
+ "appearance": {
806
+ "lineWidth": 1,
807
+ "fillOpacity": 0,
808
+ "gradientMode": "none",
809
+ "pointMode": "auto",
810
+ "pointSize": 5,
811
+ "axisPlacement": "auto",
812
+ "axisColorMode": "text",
813
+ "axisCenteredZero": false,
814
+ "barAlignment": 0,
815
+ "scaleDistribution": {
816
+ "type": "linear"
817
+ },
818
+ "drawStyle": "line",
819
+ "spanNulls": false,
820
+ "stackingGroup": "A",
821
+ "fieldColorMode": "palette-classic",
822
+ "thresholdsMode": "absolute",
823
+ "thresholdsStyleMode": "off",
824
+ "hideFrom": {
825
+ "legend": false,
826
+ "tooltip": false,
827
+ "viz": false
828
+ }
829
+ },
830
+ "legend": {
831
+ "displayMode": "list"
832
+ },
833
+ "tooltip": {
834
+ "mode": "single",
835
+ "sort": "none"
836
+ }
837
+ }
838
+ }
839
+ },
840
+ "queries": [
841
+ {
842
+ "name": "",
843
+ "type": "sequence",
844
+ "qtype": "promql",
845
+ "datasource": "dataflux",
846
+ "disabled": false,
847
+ "query": {
848
+ "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))",
849
+ "code": "A",
850
+ "type": "promql",
851
+ "promqlCode": 1,
852
+ "alias": ""
853
+ },
854
+ "extend": {
855
+ "refId": "A",
856
+ "datasource": {
857
+ "type": "guance-guance-datasource",
858
+ "uid": "o9PpQVUHz"
859
+ }
860
+ }
861
+ }
862
+ ]
863
+ },
864
+ {
865
+ "name": "Panel Title",
866
+ "type": "sequence",
867
+ "group": {
868
+ "name": "Row title"
869
+ },
870
+ "pos": {
871
+ "x": 0,
872
+ "y": 17.6,
873
+ "w": 12,
874
+ "h": 15.3
875
+ },
876
+ "extend": {
877
+ "settings": {
878
+ "showTitle": true,
879
+ "titleDesc": "",
880
+ "isSampling": true,
881
+ "changeWorkspace": true,
882
+ "workspaceUUID": "wksp_aef7103dc5a44397a9f4d0442517a15e,wksp_3e4be8bfca7f4149889b83805caf16c3",
883
+ "workspaceName": [
884
+ "huangdong的测试空间",
885
+ "测试另一个【ScopeDB】开发测试一起用"
886
+ ],
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
+ "unitType": "global",
904
+ "globalUnit": [
905
+ "custom",
906
+ "short"
907
+ ],
908
+ "levels": [
909
+ {
910
+ "title": "Level 1",
911
+ "value": 0,
912
+ "bgColor": "green"
913
+ },
914
+ {
915
+ "title": "Level 2",
916
+ "value": 80,
917
+ "bgColor": "red"
918
+ }
919
+ ],
920
+ "scientificNotation": true,
921
+ "mainMeasurementQueryCode": "B",
922
+ "extend": {
923
+ "appearance": {
924
+ "lineWidth": 1,
925
+ "fillOpacity": 0,
926
+ "gradientMode": "none",
927
+ "pointMode": "auto",
928
+ "pointSize": 5,
929
+ "axisPlacement": "auto",
930
+ "axisColorMode": "text",
931
+ "axisCenteredZero": false,
932
+ "barAlignment": 0,
933
+ "scaleDistribution": {
934
+ "type": "linear"
935
+ },
936
+ "drawStyle": "line",
937
+ "spanNulls": false,
938
+ "stackingGroup": "A",
939
+ "fieldColorMode": "palette-classic",
940
+ "thresholdsMode": "absolute",
941
+ "thresholdsStyleMode": "off",
942
+ "hideFrom": {
943
+ "legend": false,
944
+ "tooltip": false,
945
+ "viz": false
946
+ }
947
+ },
948
+ "legend": {
949
+ "displayMode": "list"
950
+ },
951
+ "tooltip": {
952
+ "mode": "single",
953
+ "sort": "none"
954
+ }
955
+ }
956
+ }
957
+ },
958
+ "queries": [
959
+ {
960
+ "name": "",
961
+ "type": "sequence",
962
+ "qtype": "dql",
963
+ "datasource": "dataflux",
964
+ "disabled": true,
965
+ "query": {
966
+ "q": "D::RE(`.*`):(count(`*`))",
967
+ "code": "B",
968
+ "type": "dql",
969
+ "alias": ""
970
+ },
971
+ "extend": {
972
+ "refId": "B",
973
+ "datasource": {
974
+ "type": "guance-guance-datasource",
975
+ "uid": "2270qUUNz"
976
+ }
977
+ }
978
+ },
979
+ {
980
+ "name": "",
981
+ "type": "sequence",
982
+ "qtype": "dql",
983
+ "datasource": "dataflux",
984
+ "disabled": true,
985
+ "query": {
986
+ "q": "D::RE(`.*`):(count(`*`))",
987
+ "code": "A",
988
+ "type": "dql",
989
+ "alias": ""
990
+ },
991
+ "extend": {
992
+ "refId": "A",
993
+ "datasource": {
994
+ "type": "guance-guance-datasource",
995
+ "uid": "2270qUUNz"
996
+ }
997
+ }
998
+ },
999
+ {
1000
+ "name": "",
1001
+ "type": "sequence",
1002
+ "qtype": "dql",
1003
+ "datasource": "dataflux",
1004
+ "disabled": false,
1005
+ "query": {
1006
+ "q": "M::`cpu`:(avg(`load5s`))",
1007
+ "code": "C",
1008
+ "type": "dql",
1009
+ "alias": ""
1010
+ },
1011
+ "extend": {
1012
+ "refId": "C",
1013
+ "datasource": {
1014
+ "type": "guance-guance-datasource",
1015
+ "uid": "2270qUUNz"
1016
+ }
1017
+ }
1018
+ }
1019
+ ]
1020
+ }
1021
+ ],
1022
+ "groups": [
1023
+ {
1024
+ "name": "Row title"
1025
+ }
1026
+ ],
1027
+ "type": "template"
1028
+ }
1029
+ }