-
Notifications
You must be signed in to change notification settings - Fork 160
/
rows.libsonnet
56 lines (53 loc) · 1.74 KB
/
rows.libsonnet
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
local g = import './g.libsonnet';
{
new(panels, type): if type == 'otel'
then {
golangMemory:
g.panel.row.new('Golang runtime: memory')
+ g.panel.row.withCollapsed(false)
+ g.panel.row.withPanels(
[
panels.memHeapBytes { gridPos: { w: 12, h: 7 } },
panels.memHeapObjects { gridPos: { w: 12, h: 7 } },
],
),
golangRuntime:
g.panel.row.new('Golang runtime')
+ g.panel.row.withCollapsed(false)
+ g.panel.row.withPanels(
[
panels.uptime { gridPos: { w: 4, h: 7 } },
panels.cGo { gridPos: { w: 4, h: 7 } },
panels.goRoutines { gridPos: { w: 8, h: 7 } },
panels.gcDuration { gridPos: { w: 8, h: 7 } },
]
),
} else // prometheus
{
golangRuntime:
g.panel.row.new('Golang runtime')
+ g.panel.row.withCollapsed(false)
+ g.panel.row.withPanels(
[
panels.version { gridPos: { w: 6, h: 4 } },
panels.uptime { gridPos: { w: 6, h: 4 } },
panels.cGo { gridPos: { w: 6, h: 4 } },
panels.goThreads { gridPos: { w: 6, h: 4 } },
panels.goRoutines { gridPos: { w: 12, h: 7 } },
panels.gcDuration { gridPos: { w: 12, h: 7 } },
]
),
golangMemory:
g.panel.row.new('Go runtime: memory')
+ g.panel.row.withCollapsed(false)
+ g.panel.row.withPanels(
[
panels.mem { gridPos: { w: 8, h: 7 } },
panels.memHeapBytes { gridPos: { w: 8, h: 7 } },
panels.memHeapObjects { gridPos: { w: 8, h: 7 } },
panels.memOffHeap { gridPos: { w: 12, h: 7 } },
panels.memStack { gridPos: { w: 12, h: 7 } },
]
),
},
}