Skip to content

Commit 72f5f0d

Browse files
Merge pull request #115 from tarantool/114-iproto-overall
Add overall net requests panel for Prometheus
2 parents 106d01f + 73046ef commit 72f5f0d

File tree

5 files changed

+331
-181
lines changed

5 files changed

+331
-181
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## Unreleased
8+
### Added
9+
- Overall net requests panel for Prometheus dashboard
10+
811
### Changed
912
- Use green color for low values in overall panels
1013
- Configure default collector in example cluster

dashboard/panels/cluster.libsonnet

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ local prometheus = grafana.prometheus;
162162
decimals=0,
163163
unit='none',
164164
expr=std.format('sum(up{job=~"%s"})', job),
165-
) { gridPos: { w: 8, h: 3 } },
165+
) { gridPos: { w: 6, h: 3 } },
166166

167167
memory_used_stat(
168168
title='',
@@ -193,7 +193,7 @@ local prometheus = grafana.prometheus;
193193
decimals=2,
194194
unit='bytes',
195195
expr=std.format('sum(tnt_slab_arena_used{job=~"%s"})', job),
196-
) { gridPos: { w: 4, h: 5 } },
196+
) { gridPos: { w: 3, h: 3 } },
197197

198198
memory_reserved_stat(
199199
title='',
@@ -224,7 +224,7 @@ local prometheus = grafana.prometheus;
224224
decimals=2,
225225
unit='bytes',
226226
expr=std.format('sum(tnt_slab_quota_size{job=~"%s"})', job),
227-
) { gridPos: { w: 4, h: 5 } },
227+
) { gridPos: { w: 3, h: 3 } },
228228

229229
space_ops_stat(
230230
title='',
@@ -257,7 +257,7 @@ local prometheus = grafana.prometheus;
257257
decimals=3,
258258
unit='ops',
259259
expr=std.format('sum(rate(tnt_stats_op_total{job=~"%s"}[%s]))', [job, rate_time_range]),
260-
) { gridPos: { w: 4, h: 4 } },
260+
) { gridPos: { w: 4, h: 5 } },
261261

262262
http_rps_stat(
263263
title='',
@@ -275,7 +275,7 @@ local prometheus = grafana.prometheus;
275275
else (
276276
if datasource == '${DS_PROMETHEUS}' then
277277
|||
278-
Overall rate of requests processed on Tarantool instances (all methods and response codes).
278+
Overall rate of HTTP requests processed on Tarantool instances (all methods and response codes).
279279
If Tarantool instance is not available for Prometheus metrics extraction now, its contribution is not counted.
280280
If `No data` displayed, check up your 'rate_time_range' variable.
281281
|||
@@ -290,7 +290,40 @@ local prometheus = grafana.prometheus;
290290
decimals=3,
291291
unit='reqps',
292292
expr=std.format('sum(rate(http_server_request_latency_count{job=~"%s"}[%s]))', [job, rate_time_range]),
293-
) { gridPos: { w: 4, h: 4 } },
293+
) { gridPos: { w: 4, h: 5 } },
294+
295+
net_rps_stat(
296+
title='',
297+
description=null,
298+
299+
datasource=null,
300+
measurement=null,
301+
job=null,
302+
rate_time_range=null,
303+
):: overview_stat(
304+
title=title,
305+
description=(
306+
if description != null then
307+
description
308+
else (
309+
if datasource == '${DS_PROMETHEUS}' then
310+
|||
311+
Overall rate of network requests processed on Tarantool instances.
312+
If Tarantool instance is not available for Prometheus metrics extraction now, its contribution is not counted.
313+
If `No data` displayed, check up your 'rate_time_range' variable.
314+
|||
315+
else
316+
null
317+
)
318+
),
319+
datasource=datasource,
320+
measurement=measurement,
321+
job=job,
322+
stat_title='Overall net load:',
323+
decimals=3,
324+
unit='reqps',
325+
expr=std.format('sum(rate(tnt_net_requests_total{job=~"%s"}[%s]))', [job, rate_time_range]),
326+
) { gridPos: { w: 4, h: 5 } },
294327

295328
local cartridge_issues(
296329
title,

dashboard/section.libsonnet

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,29 +42,35 @@ local vinyl = import 'panels/vinyl.libsonnet';
4242
cluster.health_overview_stat(
4343
datasource=datasource,
4444
job=job,
45-
) { gridPos: { w: 8, h: 3, x: 12, y: 1 } },
45+
) { gridPos: { w: 6, h: 3, x: 12, y: 1 } },
4646

4747
cluster.memory_used_stat(
4848
datasource=datasource,
4949
job=job,
50-
) { gridPos: { w: 4, h: 5, x: 12, y: 4 } },
50+
) { gridPos: { w: 3, h: 3, x: 18, y: 1 } },
5151

5252
cluster.memory_reserved_stat(
5353
datasource=datasource,
5454
job=job,
55-
) { gridPos: { w: 4, h: 5, x: 16, y: 4 } },
55+
) { gridPos: { w: 3, h: 3, x: 21, y: 1 } },
5656

57-
cluster.space_ops_stat(
57+
cluster.http_rps_stat(
5858
datasource=datasource,
5959
job=job,
6060
rate_time_range=rate_time_range,
61-
) { gridPos: { w: 4, h: 4, x: 20, y: 1 } },
61+
) { gridPos: { w: 4, h: 5, x: 12, y: 4 } },
6262

63-
cluster.http_rps_stat(
63+
cluster.net_rps_stat(
64+
datasource=datasource,
65+
job=job,
66+
rate_time_range=rate_time_range,
67+
) { gridPos: { w: 4, h: 5, x: 16, y: 4 } },
68+
69+
cluster.space_ops_stat(
6470
datasource=datasource,
6571
job=job,
6672
rate_time_range=rate_time_range,
67-
) { gridPos: { w: 4, h: 4, x: 20, y: 5 } },
73+
) { gridPos: { w: 4, h: 5, x: 20, y: 4 } },
6874

6975
cluster.cartridge_warning_issues(
7076
datasource=datasource,

0 commit comments

Comments
 (0)