@cloudcare/guance-front-tools 1.0.20 → 1.0.21
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.
- package/README.md +0 -64
- package/lib/cjs/generated/dashboardCharts.d.ts +172 -69
- package/lib/cjs/scripts/convert-grafana-dashboard-core.js +417 -56
- package/lib/esm/generated/dashboardCharts.d.ts +172 -69
- package/lib/esm/scripts/convert-grafana-dashboard-core.js +417 -56
- package/lib/example/1860_rev45.json +15536 -0
- package/lib/example/guance-dashboard.json +16766 -2702
- package/lib/scripts/convert-grafana-dashboard-core.js +1899 -1633
- package/package.json +1 -1
- package/schemas/charts/chart-schema.json +711 -1
- package/schemas/charts/settings/_common-settings-gradual-color-schema.json +17 -3
- package/schemas/charts/settings/_common-settings-legend-values-schema.json +23 -15
- package/{skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-treemap-settings-schema.json → schemas/charts/settings/chart-change-settings-schema.json} +34 -32
- package/schemas/charts/settings/chart-chinamap-settings-schema.json +2 -1
- package/schemas/charts/settings/chart-command-settings-schema.json +16 -0
- package/schemas/charts/settings/chart-hexgon-settings-schema.json +2 -1
- package/{skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-log-settings-schema.json → schemas/charts/settings/chart-monitor-settings-schema.json} +27 -30
- package/schemas/charts/settings/chart-sequence-settings-schema.json +2 -3
- package/schemas/charts/settings/chart-topology-settings-schema.json +1 -6
- package/schemas/charts/settings/chart-video-settings-schema.json +45 -0
- package/schemas/charts/settings/chart-worldmap-settings-schema.json +2 -1
- package/schemas/charts/settings/settings-alias-schema.json +14 -1
- package/schemas/charts/settings/settings-compare-schema.json +20 -12
- package/schemas/charts/settings/settings-schema.json +13 -1
- package/schemas/charts/settings/settings-time-schema.json +38 -23
- package/schemas/charts/settings/settings-unit-items-schema.json +222 -210
- package/schemas/charts/settings/settings-units-schema.json +0 -3
- package/test/cli.test.mjs +66 -44
- package/skills/grafana-to-guance-dashboard/SKILL.md +0 -490
- package/skills/grafana-to-guance-dashboard/agents/openai.yaml +0 -4
- package/skills/grafana-to-guance-dashboard/fixtures/grafana-dashboard.guance.json +0 -1029
- package/skills/grafana-to-guance-dashboard/fixtures/grafana-dashboard.json +0 -878
- package/skills/grafana-to-guance-dashboard/package.json +0 -16
- package/skills/grafana-to-guance-dashboard/references/conversion-audit-checklist.md +0 -183
- package/skills/grafana-to-guance-dashboard/references/converter-notes.md +0 -244
- package/skills/grafana-to-guance-dashboard/references/promql-compatibility-cheatsheet.md +0 -172
- package/skills/grafana-to-guance-dashboard/references/unit-inference-cheatsheet.md +0 -174
- package/skills/grafana-to-guance-dashboard/schemas/charts/chart-schema.json +0 -84
- package/skills/grafana-to-guance-dashboard/schemas/charts/common/chart-link-item-schema.json +0 -48
- package/skills/grafana-to-guance-dashboard/schemas/charts/common/chart-links-schema.json +0 -9
- package/skills/grafana-to-guance-dashboard/schemas/charts/common/common-chart-types-schema.json +0 -39
- package/skills/grafana-to-guance-dashboard/schemas/charts/common/common-vars-item-schema.json +0 -117
- package/skills/grafana-to-guance-dashboard/schemas/charts/common/common-vars-schema.json +0 -10
- package/skills/grafana-to-guance-dashboard/schemas/charts/dashboard-schema.json +0 -80
- package/skills/grafana-to-guance-dashboard/schemas/charts/query/queries-schema.json +0 -10
- package/skills/grafana-to-guance-dashboard/schemas/charts/query/query-item-schema.json +0 -60
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/_common-settings-connect-null-schema.json +0 -7
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/_common-settings-gradual-color-schema.json +0 -72
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/_common-settings-groupby-schema.json +0 -22
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/_common-settings-legend-position-schema.json +0 -14
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/_common-settings-legend-values-schema.json +0 -19
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/_common-settings-open-stack-schema.json +0 -8
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/_common-settings-show-label-schema.json +0 -8
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/_common-settings-show-line-schema.json +0 -8
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/_common-settings-stack-content-schema.json +0 -12
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/_common-settings-stack-type-schema.json +0 -11
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-alarm-settings-schema.json +0 -48
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-bar-settings-schema.json +0 -69
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-chinamap-settings-schema.json +0 -102
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-funnel-settings-schema.json +0 -34
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-gauge-settings-schema.json +0 -65
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-heatmap-settings-schema.json +0 -50
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-hexgon-settings-schema.json +0 -90
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-histogram-settings-schema.json +0 -47
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-iframe-settings-schema.json +0 -24
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-object-settings-schema.json +0 -52
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-picture-settings-schema.json +0 -46
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-pie-settings-schema.json +0 -90
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-sankey-settings-schema.json +0 -34
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-scatter-bubble-settings-schema.json +0 -31
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-sequence-settings-schema.json +0 -76
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-singlestat-settings-schema.json +0 -163
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-table-settings-schema.json +0 -184
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-text-settings-schema.json +0 -20
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-toplist-settings-schema.json +0 -117
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-topology-settings-schema.json +0 -71
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-worldmap-settings-schema.json +0 -102
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/common-settings-schema.json +0 -82
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/settings-alias-schema.json +0 -47
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/settings-chart-type-schema.json +0 -27
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/settings-colors-schema.json +0 -46
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/settings-compare-schema.json +0 -58
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/settings-fixed-time-schema.json +0 -49
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/settings-levels-schema.json +0 -33
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/settings-schema.json +0 -79
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/settings-time-schema.json +0 -43
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/settings-unit-items-schema.json +0 -228
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/settings-units-schema.json +0 -59
- package/skills/grafana-to-guance-dashboard/schemas/dashboard-schema.json +0 -5
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/attribute-mutation-schema.json +0 -21
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/attributes-schema.json +0 -10
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/cdata-node-schema.json +0 -19
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/creation-reason-schema.json +0 -17
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/document-fragment-node-schema.json +0 -35
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/document-node-schema.json +0 -30
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/document-type-node-schema.json +0 -28
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/element-node-schema.json +0 -33
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/frustration-record-schema.json +0 -49
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/full-snapshot-record-schema.json +0 -26
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/incremental-data-schema.json +0 -36
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/incremental-snapshot-record-schema.json +0 -29
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/input-data-schema.json +0 -27
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/input-state-schema.json +0 -27
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/media-interaction-data-schema.json +0 -23
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/media-interaction-schema.json +0 -20
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/mouse-interaction-data-schema.json +0 -23
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/mouse-interaction-schema.json +0 -47
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/mouse-move-data-schema.json +0 -23
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/mouse-position-schema.json +0 -26
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/mutation-data-schema.json +0 -23
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/mutation-payload-schema.json +0 -42
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/node-added-mutation-schema.json +0 -41
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/node-removed-mutation-schema.json +0 -18
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/node-schema.json +0 -28
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/record-schema.json +0 -30
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/scroll-data-schema.json +0 -23
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/scroll-position-schema.json +0 -22
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/segment-metadata-schema.json +0 -28
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/segment-schema.json +0 -25
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/serialized-node-schema.json +0 -15
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/serialized-node-with-id-schema.json +0 -21
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/stylesheet-rule-add-schema.json +0 -28
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/stylesheet-rule-data-schema.json +0 -23
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/stylesheet-rule-delete-schema.json +0 -24
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/stylesheet-rule-schema.json +0 -29
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/stylesheet-schema.json +0 -30
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/text-mutation-schema.json +0 -27
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/text-node-schema.json +0 -23
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/common/_common-record-schema.json +0 -14
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/common/_common-segment-metadata-schema.json +0 -30
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/common/_slot-supported-common-record-schema.json +0 -21
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/common/focus-record-schema.json +0 -34
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/common/meta-record-schema.json +0 -42
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/common/pointer-interaction-data-schema.json +0 -23
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/common/pointer-interaction-schema.json +0 -34
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/common/segment-context-schema.json +0 -46
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/common/view-end-record-schema.json +0 -23
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/common/viewport-resize-data-schema.json +0 -23
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/common/viewport-resize-dimension-schema.json +0 -18
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/common/visual-viewport-record-schema.json +0 -50
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/full-snapshot-record-schema.json +0 -14
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/incremental-data-schema.json +0 -14
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/incremental-snapshot-record-schema.json +0 -14
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/_common-shape-wireframe-schema.json +0 -22
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/_common-shape-wireframe-update-schema.json +0 -22
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/_common-wireframe-schema.json +0 -38
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/_common-wireframe-update-schema.json +0 -38
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/full-snapshot-record-schema.json +0 -38
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/image-wireframe-schema.json +0 -43
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/image-wireframe-update-schema.json +0 -43
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/incremental-data-schema.json +0 -21
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/incremental-snapshot-record-schema.json +0 -26
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/mutation-data-schema.json +0 -23
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/mutation-payload-schema.json +0 -55
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/placeholder-wireframe-schema.json +0 -28
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/placeholder-wireframe-update-schema.json +0 -28
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/record-schema.json +0 -27
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/segment-metadata-schema.json +0 -25
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/segment-schema.json +0 -25
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/shape-border-schema.json +0 -25
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/shape-style-schema.json +0 -29
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/shape-wireframe-schema.json +0 -23
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/shape-wireframe-update-schema.json +0 -23
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/text-position-schema.json +0 -57
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/text-style-schema.json +0 -31
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/text-wireframe-schema.json +0 -34
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/text-wireframe-update-schema.json +0 -34
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/touch-data-schema.json +0 -51
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/webview-wireframe-schema.json +0 -33
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/webview-wireframe-update-schema.json +0 -33
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/wireframe-clip-schema.json +0 -29
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/wireframe-schema.json +0 -24
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/wireframe-update-mutation-schema.json +0 -24
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mutation-data-schema.json +0 -14
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mutation-payload-schema.json +0 -14
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/record-schema.json +0 -14
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/segment-metadata-schema.json +0 -14
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/segment-schema.json +0 -15
- package/skills/grafana-to-guance-dashboard/schemas/session-replay-browser-schema.json +0 -5
- package/skills/grafana-to-guance-dashboard/schemas/session-replay-mobile-schema.json +0 -5
- package/skills/grafana-to-guance-dashboard/schemas/session-replay-schema.json +0 -33
- package/skills/grafana-to-guance-dashboard/scripts/convert-grafana-dashboard-core.js +0 -1675
- package/skills/grafana-to-guance-dashboard/scripts/convert-grafana-dashboard.mjs +0 -120
- package/skills/grafana-to-guance-dashboard/scripts/validate-file.mjs +0 -62
- package/skills/grafana-to-guance-dashboard/test/convert.test.mjs +0 -54
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
# Unit Inference Cheatsheet
|
|
2
|
-
|
|
3
|
-
Use this reference when Grafana panels do not provide explicit units and the LLM needs to infer likely Guance units.
|
|
4
|
-
|
|
5
|
-
This file is a guide, not a source of truth. Prefer explicit Grafana panel units over any inference. When evidence conflicts, lower confidence and say so.
|
|
6
|
-
|
|
7
|
-
## Confidence Guide
|
|
8
|
-
|
|
9
|
-
- `high`
|
|
10
|
-
- explicit metric suffixes or very standard query/title combinations
|
|
11
|
-
- `medium`
|
|
12
|
-
- multiple hints align, but at least one ambiguity remains
|
|
13
|
-
- `low`
|
|
14
|
-
- weak or conflicting evidence
|
|
15
|
-
|
|
16
|
-
## Common Metric Patterns
|
|
17
|
-
|
|
18
|
-
### Bytes
|
|
19
|
-
|
|
20
|
-
Strong hints:
|
|
21
|
-
|
|
22
|
-
- metric names ending with `_bytes`, `_bytes_total`, `_byte`
|
|
23
|
-
- names containing `memory`, `heap`, `rss`, `working_set`, `filesystem`, `disk_usage`
|
|
24
|
-
- titles containing `memory`, `heap`, `disk usage`, `storage`
|
|
25
|
-
|
|
26
|
-
Recommended unit:
|
|
27
|
-
|
|
28
|
-
- `bytes`
|
|
29
|
-
|
|
30
|
-
Typical confidence:
|
|
31
|
-
|
|
32
|
-
- `high`
|
|
33
|
-
|
|
34
|
-
### Seconds
|
|
35
|
-
|
|
36
|
-
Strong hints:
|
|
37
|
-
|
|
38
|
-
- metric names ending with `_seconds`
|
|
39
|
-
- names containing `duration_seconds`, `response_seconds`, `latency_seconds`, `gc_pause_seconds`
|
|
40
|
-
- titles explicitly mentioning `seconds`
|
|
41
|
-
|
|
42
|
-
Recommended unit:
|
|
43
|
-
|
|
44
|
-
- `s`
|
|
45
|
-
|
|
46
|
-
Typical confidence:
|
|
47
|
-
|
|
48
|
-
- `high`
|
|
49
|
-
|
|
50
|
-
### Milliseconds
|
|
51
|
-
|
|
52
|
-
Strong hints:
|
|
53
|
-
|
|
54
|
-
- metric names ending with `_ms`
|
|
55
|
-
- titles containing `latency`, `duration`, `response time`, `RT`, `耗时`
|
|
56
|
-
- queries using `histogram_quantile` on latency-style histograms
|
|
57
|
-
|
|
58
|
-
Recommended unit:
|
|
59
|
-
|
|
60
|
-
- `ms`
|
|
61
|
-
|
|
62
|
-
Typical confidence:
|
|
63
|
-
|
|
64
|
-
- `high` when suffixes or title strongly support it
|
|
65
|
-
- `medium` when inferred mostly from panel title and histogram structure
|
|
66
|
-
|
|
67
|
-
### Percent
|
|
68
|
-
|
|
69
|
-
Strong hints:
|
|
70
|
-
|
|
71
|
-
- metric names ending with `_percent` or containing `_ratio`
|
|
72
|
-
- queries multiplying by `100`
|
|
73
|
-
- titles containing `error rate`, `success rate`, `utilization`, `usage ratio`, `占用率`
|
|
74
|
-
|
|
75
|
-
Recommended unit:
|
|
76
|
-
|
|
77
|
-
- `percent`
|
|
78
|
-
|
|
79
|
-
Typical confidence:
|
|
80
|
-
|
|
81
|
-
- `high` when the query includes `* 100` or explicit percent naming
|
|
82
|
-
- `medium` for utilization-like panels without explicit scaling
|
|
83
|
-
|
|
84
|
-
### Requests Per Second
|
|
85
|
-
|
|
86
|
-
Strong hints:
|
|
87
|
-
|
|
88
|
-
- titles containing `QPS`, `RPS`, `request rate`, `吞吐`
|
|
89
|
-
- metrics containing `requests_total` together with `rate(...)` or `irate(...)`
|
|
90
|
-
- legends or titles describing traffic volume over time
|
|
91
|
-
|
|
92
|
-
Recommended unit:
|
|
93
|
-
|
|
94
|
-
- `reqps`
|
|
95
|
-
|
|
96
|
-
Typical confidence:
|
|
97
|
-
|
|
98
|
-
- `high` when a monotonically increasing request counter is wrapped in a rate-like function
|
|
99
|
-
- `medium` when only the title hints at request throughput
|
|
100
|
-
|
|
101
|
-
### Operations Per Second
|
|
102
|
-
|
|
103
|
-
Strong hints:
|
|
104
|
-
|
|
105
|
-
- titles containing `OPS`, `IOPS`, `TPS`
|
|
106
|
-
- counters combined with `rate(...)` where the operation is not clearly an HTTP request
|
|
107
|
-
- disk or storage operation metrics over time
|
|
108
|
-
|
|
109
|
-
Recommended unit:
|
|
110
|
-
|
|
111
|
-
- `ops`
|
|
112
|
-
|
|
113
|
-
Typical confidence:
|
|
114
|
-
|
|
115
|
-
- `high` for standard IOPS/TPS counters
|
|
116
|
-
- `medium` for generic operation counters
|
|
117
|
-
|
|
118
|
-
### Count-Like Values
|
|
119
|
-
|
|
120
|
-
Strong hints:
|
|
121
|
-
|
|
122
|
-
- names containing `count`, `connections`, `goroutines`, `threads`, `fds`, `pending`, `queue_depth`
|
|
123
|
-
- titles describing counts rather than rates or durations
|
|
124
|
-
- no clear byte/time/percent signal
|
|
125
|
-
|
|
126
|
-
Recommended unit:
|
|
127
|
-
|
|
128
|
-
- `none`
|
|
129
|
-
|
|
130
|
-
Typical confidence:
|
|
131
|
-
|
|
132
|
-
- `medium`
|
|
133
|
-
|
|
134
|
-
## Title Hints
|
|
135
|
-
|
|
136
|
-
Titles can raise confidence when query naming is weak.
|
|
137
|
-
|
|
138
|
-
- `latency`, `duration`, `响应时间`, `耗时`
|
|
139
|
-
- usually `ms` or `s`
|
|
140
|
-
- `memory`, `heap`, `disk`, `storage`
|
|
141
|
-
- usually `bytes`
|
|
142
|
-
- `qps`, `rps`, `throughput`, `吞吐`
|
|
143
|
-
- usually `reqps`
|
|
144
|
-
- `error rate`, `success rate`, `utilization`, `占比`
|
|
145
|
-
- usually `percent`
|
|
146
|
-
- `connections`, `goroutines`, `threads`, `count`
|
|
147
|
-
- usually `none`
|
|
148
|
-
|
|
149
|
-
## PromQL Function Hints
|
|
150
|
-
|
|
151
|
-
- `rate(...)`, `irate(...)`, `increase(...)`
|
|
152
|
-
- often indicates throughput if the underlying metric is a monotonically increasing counter
|
|
153
|
-
- `histogram_quantile(...)`
|
|
154
|
-
- often indicates latency or duration distributions
|
|
155
|
-
- `sum by (...)`
|
|
156
|
-
- does not determine the unit by itself
|
|
157
|
-
- `count_over_time(...)`
|
|
158
|
-
- often suggests count-like `none`
|
|
159
|
-
|
|
160
|
-
## Ambiguous Cases
|
|
161
|
-
|
|
162
|
-
Use lower confidence when:
|
|
163
|
-
|
|
164
|
-
- the title suggests time, but the metric suffix suggests bytes
|
|
165
|
-
- the query mixes several metrics with different semantics
|
|
166
|
-
- recording rules hide the original metric meaning
|
|
167
|
-
- panel titles are generic, such as `Usage`, `Value`, or `Current`
|
|
168
|
-
- PromQL was heavily rewritten and the original naming intent is unclear
|
|
169
|
-
|
|
170
|
-
In these cases, prefer:
|
|
171
|
-
|
|
172
|
-
- `medium` or `low` confidence
|
|
173
|
-
- a one-sentence reason
|
|
174
|
-
- manual review if the unit materially affects the chart interpretation
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "charts/chart-schema.json",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"description": "图表完整结构",
|
|
6
|
-
"title": "ChartData",
|
|
7
|
-
"required": [
|
|
8
|
-
"extend",
|
|
9
|
-
"name",
|
|
10
|
-
"pos",
|
|
11
|
-
"type",
|
|
12
|
-
"queries"
|
|
13
|
-
],
|
|
14
|
-
"properties": {
|
|
15
|
-
"extend": {
|
|
16
|
-
"type": "object",
|
|
17
|
-
"additionalProperties": true,
|
|
18
|
-
"properties": {
|
|
19
|
-
"links": {
|
|
20
|
-
"$ref": "common/chart-links-schema.json"
|
|
21
|
-
},
|
|
22
|
-
"settings": {
|
|
23
|
-
"$ref": "settings/settings-schema.json"
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
"group": {
|
|
28
|
-
"type": "object",
|
|
29
|
-
"properties": {
|
|
30
|
-
"name": {
|
|
31
|
-
"oneOf": [
|
|
32
|
-
{
|
|
33
|
-
"type": "string",
|
|
34
|
-
"description": "分组名称"
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"type": "null",
|
|
38
|
-
"description": "分组名称"
|
|
39
|
-
}
|
|
40
|
-
]
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
"name": {
|
|
45
|
-
"type": "string",
|
|
46
|
-
"description": "图表名称"
|
|
47
|
-
},
|
|
48
|
-
"pos": {
|
|
49
|
-
"description": "图表位置信息",
|
|
50
|
-
"type": "object",
|
|
51
|
-
"required": [
|
|
52
|
-
"h",
|
|
53
|
-
"w",
|
|
54
|
-
"x",
|
|
55
|
-
"y"
|
|
56
|
-
],
|
|
57
|
-
"properties": {
|
|
58
|
-
"h": {
|
|
59
|
-
"description": "图表高度,每行的高度默认为10像素,比如 h 为12, 则实际高度为 12 * 10",
|
|
60
|
-
"type": "number"
|
|
61
|
-
},
|
|
62
|
-
"w": {
|
|
63
|
-
"type": "number",
|
|
64
|
-
"description": "图表宽度,栅格系统的最大列数为 24, 比如 w为12,则显示宽度则为容器宽度的 1/2 倍 "
|
|
65
|
-
},
|
|
66
|
-
"x": {
|
|
67
|
-
"type": "number",
|
|
68
|
-
"description": "图表距离容器的水平距离,栅格系统的最大列数为 24, 比如 x为12,则图表距离容器左边的水平距离为容器宽度 1/2 倍 "
|
|
69
|
-
},
|
|
70
|
-
"y": {
|
|
71
|
-
"type": "number",
|
|
72
|
-
"description": "图表距离容器垂直距离,每行的高度默认为10像素,比如 y为12, 则实际高度为 12 * 10"
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
"type": {
|
|
77
|
-
"description": "图表类型",
|
|
78
|
-
"$ref": "common/common-chart-types-schema.json"
|
|
79
|
-
},
|
|
80
|
-
"queries": {
|
|
81
|
-
"$ref": "query/queries-schema.json"
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
package/skills/grafana-to-guance-dashboard/schemas/charts/common/chart-link-item-schema.json
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "charts/common/chart-link-item-schema.json",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"description": "图表联动跳转项",
|
|
6
|
-
"required": [
|
|
7
|
-
"url",
|
|
8
|
-
"open",
|
|
9
|
-
"show",
|
|
10
|
-
"type",
|
|
11
|
-
"showChanged"
|
|
12
|
-
],
|
|
13
|
-
"properties": {
|
|
14
|
-
"url": {
|
|
15
|
-
"type": "string",
|
|
16
|
-
"description": "跳转地址"
|
|
17
|
-
},
|
|
18
|
-
"open": {
|
|
19
|
-
"type": "string",
|
|
20
|
-
"description": "打开方式",
|
|
21
|
-
"enum": [
|
|
22
|
-
"newWin",
|
|
23
|
-
"curWin",
|
|
24
|
-
"drawerWin"
|
|
25
|
-
]
|
|
26
|
-
},
|
|
27
|
-
"show": {
|
|
28
|
-
"type": "boolean",
|
|
29
|
-
"description": "是否展示"
|
|
30
|
-
},
|
|
31
|
-
"type": {
|
|
32
|
-
"type": "string",
|
|
33
|
-
"description": "跳转类型",
|
|
34
|
-
"enum": [
|
|
35
|
-
"logging",
|
|
36
|
-
"container",
|
|
37
|
-
"processes",
|
|
38
|
-
"tracing",
|
|
39
|
-
"host",
|
|
40
|
-
"custom"
|
|
41
|
-
]
|
|
42
|
-
},
|
|
43
|
-
"showChanged": {
|
|
44
|
-
"type": "boolean",
|
|
45
|
-
"description": "是否修改过显示状态"
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
package/skills/grafana-to-guance-dashboard/schemas/charts/common/common-chart-types-schema.json
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "charts/common/common-chart-types-schema.json",
|
|
4
|
-
"type": "string",
|
|
5
|
-
"title": "ChartType",
|
|
6
|
-
"description": "支持图表类型枚举",
|
|
7
|
-
"enum": [
|
|
8
|
-
"group",
|
|
9
|
-
"sequence",
|
|
10
|
-
"singlestat",
|
|
11
|
-
"pie",
|
|
12
|
-
"bar",
|
|
13
|
-
"histogram",
|
|
14
|
-
"slo",
|
|
15
|
-
"toplist",
|
|
16
|
-
"gauge",
|
|
17
|
-
"scatter",
|
|
18
|
-
"bubble",
|
|
19
|
-
"table",
|
|
20
|
-
"treemap",
|
|
21
|
-
"funnel",
|
|
22
|
-
"chinamap",
|
|
23
|
-
"worldmap",
|
|
24
|
-
"hexgon",
|
|
25
|
-
"heatmap",
|
|
26
|
-
"topology",
|
|
27
|
-
"sankey",
|
|
28
|
-
"change",
|
|
29
|
-
"log",
|
|
30
|
-
"object",
|
|
31
|
-
"monitor",
|
|
32
|
-
"alarm",
|
|
33
|
-
"text",
|
|
34
|
-
"video",
|
|
35
|
-
"picture",
|
|
36
|
-
"command",
|
|
37
|
-
"iframe"
|
|
38
|
-
]
|
|
39
|
-
}
|
package/skills/grafana-to-guance-dashboard/schemas/charts/common/common-vars-item-schema.json
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "charts/common/common-vars-item-schema.json",
|
|
4
|
-
"title": "chartVarsItem",
|
|
5
|
-
"description": "图表视图变量完整结构",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"additionalProperties": true,
|
|
8
|
-
"properties": {
|
|
9
|
-
"definition": {
|
|
10
|
-
"type": "object",
|
|
11
|
-
"properties": {
|
|
12
|
-
"tag": {
|
|
13
|
-
"type": "string",
|
|
14
|
-
"description": "定义 type 为 metrc 类型对应的指标 tag"
|
|
15
|
-
},
|
|
16
|
-
"field": {
|
|
17
|
-
"type": "string",
|
|
18
|
-
"description": "定义 type 为 metrc,object,custom_object, logging, tracing,rum,securit 类型对应的 field"
|
|
19
|
-
},
|
|
20
|
-
"value": {
|
|
21
|
-
"type": "string",
|
|
22
|
-
"description": "定义 type 为 dql,promql,custom_object类型对应的 dql、promql,或者以‘,’号分割的自定义字符串数据"
|
|
23
|
-
},
|
|
24
|
-
"metric": {
|
|
25
|
-
"type": "string",
|
|
26
|
-
"description": "1.type 为 metric 对应指标集 2. type 为 logging,rum 对应 source。"
|
|
27
|
-
},
|
|
28
|
-
"object": {
|
|
29
|
-
"type": "string",
|
|
30
|
-
"description": "type 为 object, custom_object 对应对象 source"
|
|
31
|
-
},
|
|
32
|
-
"defaultVal": {
|
|
33
|
-
"description": "视图变量默认填充值",
|
|
34
|
-
"type": "object",
|
|
35
|
-
"properties": {
|
|
36
|
-
"label": {
|
|
37
|
-
"type": "string",
|
|
38
|
-
"description": "默认填充值 label,如果没有则和 value 保持一致"
|
|
39
|
-
},
|
|
40
|
-
"value": {
|
|
41
|
-
"type": "string",
|
|
42
|
-
"description": "默认填充值 value"
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
"type": {
|
|
49
|
-
"description": "视图变量查询类型,对应关系分别为 QUERY:【DQL】,PROMQL_QUERY:【PROMQL】,TAG:【指标】,FIELD:【基础对象】,FIELD:【自定义对象】,LOGGING:【日志】,TRACING:【应用性能】,RUM:【用户访问】,SECURITY:【安全巡检】,CUSTOM_LIST:【自定义】",
|
|
50
|
-
"type": "string",
|
|
51
|
-
"enum": [
|
|
52
|
-
"QUERY",
|
|
53
|
-
"PROMQL_QUERY",
|
|
54
|
-
"FIELD",
|
|
55
|
-
"TAG",
|
|
56
|
-
"LOGGING",
|
|
57
|
-
"TRACING",
|
|
58
|
-
"RUM",
|
|
59
|
-
"SECURITY",
|
|
60
|
-
"CUSTOM_LIST"
|
|
61
|
-
]
|
|
62
|
-
},
|
|
63
|
-
"code": {
|
|
64
|
-
"type": "string",
|
|
65
|
-
"description": "需要被替换的变量名"
|
|
66
|
-
},
|
|
67
|
-
"datasource": {
|
|
68
|
-
"type": "string",
|
|
69
|
-
"enum": [
|
|
70
|
-
"dataflux",
|
|
71
|
-
"ftinfluxdb",
|
|
72
|
-
"custom",
|
|
73
|
-
"object",
|
|
74
|
-
"custom_object"
|
|
75
|
-
],
|
|
76
|
-
"description": "对应关系分别为 dataflux:【DQL】,dataflux:【PROMQL】,ftinfluxdb:【指标】,object:【基础对象】,custom_object:【自定义对象】,dataflux:【日志】,dataflux:【应用性能】,dataflux:【用户访问】,dataflux:【安全巡检】,custom:【自定义】"
|
|
77
|
-
},
|
|
78
|
-
"name": {
|
|
79
|
-
"type": "string",
|
|
80
|
-
"description": "视图变量显示名称"
|
|
81
|
-
},
|
|
82
|
-
"seq": {
|
|
83
|
-
"type": "integer",
|
|
84
|
-
"description": "当前项视图变量在列表中的顺序",
|
|
85
|
-
"examples": [
|
|
86
|
-
0,
|
|
87
|
-
1,
|
|
88
|
-
2
|
|
89
|
-
]
|
|
90
|
-
},
|
|
91
|
-
"hide": {
|
|
92
|
-
"type": "integer",
|
|
93
|
-
"description": "是否隐藏该项视图变量",
|
|
94
|
-
"enum": [
|
|
95
|
-
0,
|
|
96
|
-
1
|
|
97
|
-
]
|
|
98
|
-
},
|
|
99
|
-
"multiple": {
|
|
100
|
-
"type": "boolean",
|
|
101
|
-
"description": "设置视图变量是否能多选",
|
|
102
|
-
"default": true
|
|
103
|
-
},
|
|
104
|
-
"includeStar": {
|
|
105
|
-
"type": "boolean",
|
|
106
|
-
"description": "设置视图变量列出值是否包含 * "
|
|
107
|
-
},
|
|
108
|
-
"valueSort": {
|
|
109
|
-
"type": "string",
|
|
110
|
-
"description": "列出值排序",
|
|
111
|
-
"enum": [
|
|
112
|
-
"asc",
|
|
113
|
-
"desc"
|
|
114
|
-
]
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "charts/dashboard-schema.json",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"title": "DashboardData",
|
|
6
|
-
"description": "观测云仪表板完整结构",
|
|
7
|
-
"additionalProperties": true,
|
|
8
|
-
"properties": {
|
|
9
|
-
"title": {
|
|
10
|
-
"type": "string",
|
|
11
|
-
"description": "仪表板标题"
|
|
12
|
-
},
|
|
13
|
-
"main": {
|
|
14
|
-
"type": "object",
|
|
15
|
-
"description": "仪表板图表结构",
|
|
16
|
-
"properties": {
|
|
17
|
-
"vars": {
|
|
18
|
-
"$ref": "common/common-vars-schema.json"
|
|
19
|
-
},
|
|
20
|
-
"charts": {
|
|
21
|
-
"type": "array",
|
|
22
|
-
"description": "图表合集配置",
|
|
23
|
-
"items": {
|
|
24
|
-
"$ref": "chart-schema.json"
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
"groups": {
|
|
28
|
-
"type": "array",
|
|
29
|
-
"description": "分组配置",
|
|
30
|
-
"items": {
|
|
31
|
-
"type": "object",
|
|
32
|
-
"properties": {
|
|
33
|
-
"name": {
|
|
34
|
-
"type": "string",
|
|
35
|
-
"description": "图表分组名称"
|
|
36
|
-
},
|
|
37
|
-
"extend": {
|
|
38
|
-
"type": "object",
|
|
39
|
-
"description": "分组的额外配置,比如背景颜色",
|
|
40
|
-
"properties": {
|
|
41
|
-
"bgColor": {
|
|
42
|
-
"type": "string",
|
|
43
|
-
"description": "分组块的背景颜色"
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
"type": {
|
|
51
|
-
"description": "仪表板主体类型,现有数据中常缺省,存在时固定为 template",
|
|
52
|
-
"anyOf": [
|
|
53
|
-
{
|
|
54
|
-
"type": "string",
|
|
55
|
-
"const": "template"
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"type": "null"
|
|
59
|
-
}
|
|
60
|
-
]
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
"dashboardExtend": {
|
|
65
|
-
"description": "仪表板额外配置信息",
|
|
66
|
-
"type": "object",
|
|
67
|
-
"additionalProperties": true,
|
|
68
|
-
"properties": {
|
|
69
|
-
"groupUnfoldStatus": {
|
|
70
|
-
"type": "object",
|
|
71
|
-
"description": "分组是否收起打开配置信息,图表名称为 key, value 为 boolean。 false 为关闭,true 为打开",
|
|
72
|
-
"additionalProperties": {
|
|
73
|
-
"type": "boolean",
|
|
74
|
-
"description": "图表名称"
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "charts/query/query-item-schema.json",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"description": "图表查询语句结构",
|
|
6
|
-
"title": "ChartQueryItem",
|
|
7
|
-
"properties": {
|
|
8
|
-
"type": {
|
|
9
|
-
"description": "冗余字段,图表类型",
|
|
10
|
-
"$ref": "../common/common-chart-types-schema.json"
|
|
11
|
-
},
|
|
12
|
-
"datasource": {
|
|
13
|
-
"type": "string",
|
|
14
|
-
"description": "冗余字段,固定值",
|
|
15
|
-
"const": "dataflux"
|
|
16
|
-
},
|
|
17
|
-
"qtype": {
|
|
18
|
-
"type": "string",
|
|
19
|
-
"description": "查询语句类型,目前支持 dql 以及promql",
|
|
20
|
-
"enum": [
|
|
21
|
-
"dql",
|
|
22
|
-
"promql"
|
|
23
|
-
]
|
|
24
|
-
},
|
|
25
|
-
"query": {
|
|
26
|
-
"type": "object",
|
|
27
|
-
"description": "查询语句的额外信息",
|
|
28
|
-
"additionalProperties": true,
|
|
29
|
-
"properties": {
|
|
30
|
-
"q": {
|
|
31
|
-
"type": "string",
|
|
32
|
-
"description": "图表查询语句,可以是 dql语句,也可以是 promql 语句"
|
|
33
|
-
},
|
|
34
|
-
"content": {
|
|
35
|
-
"type": "string",
|
|
36
|
-
"description": "文本图内容,支持 HTML 或 Markdown 文本"
|
|
37
|
-
},
|
|
38
|
-
"code": {
|
|
39
|
-
"type": "string",
|
|
40
|
-
"description": "查询语句的唯一标识,由单个大写英文字母构成"
|
|
41
|
-
},
|
|
42
|
-
"type": {
|
|
43
|
-
"type": "string",
|
|
44
|
-
"description": "查询语句类型冗余字段,实际数据中可能是 promql/dql,也可能是 default/simple 这类查询模式",
|
|
45
|
-
"enum": [
|
|
46
|
-
"default",
|
|
47
|
-
"simple",
|
|
48
|
-
"dql",
|
|
49
|
-
"promql"
|
|
50
|
-
]
|
|
51
|
-
},
|
|
52
|
-
"promqlCode": {
|
|
53
|
-
"type": "integer",
|
|
54
|
-
"description": "PromQL 查询顺序编号"
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
"additionalProperties": true
|
|
60
|
-
}
|