Skip to content

Commit 0d4f65d

Browse files
add second line of panels with total data
1 parent 602a900 commit 0d4f65d

File tree

2 files changed

+67
-10
lines changed

2 files changed

+67
-10
lines changed

dashboard/panels/runtime.libsonnet

Lines changed: 62 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,64 @@ local variable = import 'dashboard/variable.libsonnet';
2525
]
2626
),
2727

28+
total_memory_per_instance(
29+
cfg,
30+
title='Total memory per instance',
31+
description=|||
32+
Total memory used by Tarantool.
33+
|||,
34+
):: common.default_graph(
35+
cfg,
36+
title=title,
37+
description=description,
38+
format='bytes',
39+
labelY1='in bytes',
40+
panel_width=8,
41+
).addTarget(
42+
if cfg.type == variable.datasource_type.prometheus then
43+
prometheus.target(
44+
expr='rate(tnt_memory[$__rate_interval]) + rate(tnt_memory_virt[$__rate_interval])',
45+
legendFormat='{{alias}}'
46+
)
47+
else if cfg.type == variable.datasource_type.influxdb then
48+
influxdb.target()
49+
),
50+
51+
resident_memory_per_instance(
52+
cfg,
53+
title='Resident memory per instance',
54+
description=|||
55+
Resident memory used by Tarantool instance.
56+
|||,
57+
):: common.default_graph(
58+
cfg,
59+
title=title,
60+
description=description,
61+
format='bytes',
62+
labelY1='in bytes',
63+
panel_width=8,
64+
).addTarget(
65+
common.target(cfg, 'tnt_memory')
66+
),
67+
68+
virtual_memory_per_instance(
69+
cfg,
70+
title='Virtual memory per instance',
71+
description=|||
72+
Virtual memory used by Tarantool instance.
73+
|||,
74+
):: common.default_graph(
75+
cfg,
76+
title=title,
77+
description=description,
78+
format='bytes',
79+
labelY1='in bytes',
80+
panel_width=8,
81+
).addTarget(
82+
common.target(cfg, 'tnt_memory_virt')
83+
),
84+
85+
2886
total_memory(
2987
cfg,
3088
title='Total memory usage',
@@ -53,9 +111,9 @@ local variable = import 'dashboard/variable.libsonnet';
53111
influxdb.target()
54112
),
55113

56-
resident_memory(
114+
total_resident_memory(
57115
cfg,
58-
title='Resident memory',
116+
title='Total resident memory usage',
59117
description=|||
60118
Resident memory used by Tarantool instance.
61119
|||,
@@ -66,18 +124,16 @@ local variable = import 'dashboard/variable.libsonnet';
66124
format='bytes',
67125
labelY1='in bytes',
68126
panel_width=8,
69-
).addTarget(
70-
common.target(cfg, 'tnt_memory')
71127
).addTarget(
72128
if cfg.type == variable.datasource_type.prometheus then
73129
prometheus.target(expr=aggregate_expr(cfg, 'tnt_memory'),)
74130
else if cfg.type == variable.datasource_type.influxdb then
75131
influxdb.target()
76132
),
77133

78-
virt_memory(
134+
total_virtual_memory(
79135
cfg,
80-
title='Virtual memory',
136+
title='Total virtual memory usage',
81137
description=|||
82138
Virtual memory used by Tarantool instance.
83139
|||,
@@ -88,8 +144,6 @@ local variable = import 'dashboard/variable.libsonnet';
88144
format='bytes',
89145
labelY1='in bytes',
90146
panel_width=8,
91-
).addTarget(
92-
common.target(cfg, 'tnt_memory_virt')
93147
).addTarget(
94148
if cfg.type == variable.datasource_type.prometheus then
95149
prometheus.target(expr=aggregate_expr(cfg, 'tnt_memory_virt'),)

dashboard/section.libsonnet

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,12 @@ local vinyl = import 'dashboard/panels/vinyl.libsonnet';
239239

240240
runtime(cfg):: [
241241
runtime.row,
242+
runtime.total_memory_per_instance(cfg),
243+
runtime.resident_memory_per_instance(cfg),
244+
runtime.virtual_memory_per_instance(cfg),
242245
runtime.total_memory(cfg),
243-
runtime.resident_memory(cfg),
244-
runtime.virt_memory(cfg),
246+
runtime.total_resident_memory(cfg),
247+
runtime.total_virtual_memory(cfg),
245248
runtime.lua_memory(cfg),
246249
runtime.runtime_memory(cfg),
247250
runtime.memory_tx(cfg),

0 commit comments

Comments
 (0)