Skip to content

Commit

Permalink
dashboard: add detailed net requests panels
Browse files Browse the repository at this point in the history
Add panels for net requests in progress/in stream queue to "Tarantool
network activity" section. Deprecate existing net requests panels
since they are superseded by new ones. (Since new ones are supported in
Tarantool 2.10.0-beta2 or newer, do not remove them yet.) Metrics
were introduced in metrics 0.13.0:
- tnt_net_requests_in_progress_total
- tnt_net_requests_in_progress_current
- tnt_net_requests_in_stream_queue_total
- tnt_net_requests_in_stream_queue_current

Part of #133
  • Loading branch information
DifferentialOrange committed May 5, 2022
1 parent 668810f commit 27d39c4
Show file tree
Hide file tree
Showing 10 changed files with 2,625 additions and 677 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Replication status panel and alert example
- Read only status panel
- Vinyl regulator blocked writers panel
- Net requests in progress/in stream queue panels

### Changed
- Rework "Tarantool memory memory miscellaneous" section to "Tarantool runtime overview"
Expand Down
115 changes: 115 additions & 0 deletions dashboard/panels/net.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ local common = import 'common.libsonnet';
description=|||
Number of network requests this instance has handled.
Graph shows mean rps.
Panel will be removed in favor of "Processed requests"
and "Requests in queue (overall)" panels.
|||,
datasource=null,
policy=null,
Expand All @@ -129,6 +132,9 @@ local common = import 'common.libsonnet';
title='Network requests pending',
description=|||
Number of pending network requests.
Panel will be removed in favor of "Requests in progress"
and "Requests in queue (current)" panels.
|||,
datasource=null,
policy=null,
Expand All @@ -150,6 +156,115 @@ local common = import 'common.libsonnet';
measurement
)),

requests_in_progress_per_second(
title='Processed requests',
description=|||
Average number of requests processed by tx thread per second.
Panel works with `metrics >= 0.13.0` and `Tarantool >= 2.10-beta2`.
|||,
datasource=null,
policy=null,
measurement=null,
job=null,
rate_time_range=null,
):: common.default_graph(
title=title,
description=description,
datasource=datasource,
labelY1='requests per second',
panel_width=6,
).addTarget(common.default_rps_target(
datasource,
'tnt_net_requests_in_progress_total',
job,
rate_time_range,
policy,
measurement,
)),

requests_in_progress_current(
title='Requests in progress',
description=|||
Number of requests currently being processed in the tx thread.
Panel works with `metrics >= 0.13.0` and `Tarantool >= 2.10-beta2`.
|||,
datasource=null,
policy=null,
measurement=null,
job=null,
):: common.default_graph(
title=title,
description=description,
datasource=datasource,
decimals=0,
labelY1='current',
panel_width=6,
).addTarget(common.default_metric_target(
datasource,
'tnt_net_requests_in_progress_current',
job,
policy,
measurement,
'last'
)),

requests_in_queue_per_second(
title='Requests in queue (overall)',
description=|||
Average number of requests which was placed in queues
of streams per second.
Panel works with `metrics >= 0.13.0` and `Tarantool >= 2.10-beta2`.
|||,
datasource=null,
policy=null,
measurement=null,
job=null,
rate_time_range=null,
):: common.default_graph(
title=title,
description=description,
datasource=datasource,
labelY1='requests per second',
panel_width=6,
).addTarget(common.default_rps_target(
datasource,
'tnt_net_requests_in_stream_queue_total',
job,
rate_time_range,
policy,
measurement,
)),

requests_in_queue_current(
title='Requests in queue (current)',
description=|||
Number of requests currently waiting in queues of streams.
Panel works with `metrics >= 0.13.0` and `Tarantool >= 2.10-beta2`.
|||,
datasource=null,
policy=null,
measurement=null,
job=null,
):: common.default_graph(
title=title,
description=description,
datasource=datasource,
decimals=0,
labelY1='current',
panel_width=6,
).addTarget(common.default_metric_target(
datasource,
'tnt_net_requests_in_stream_queue_current',
job,
policy,
measurement,
'last'
)),

connections_per_second(
title='New binary connections',
description=|||
Expand Down
30 changes: 30 additions & 0 deletions dashboard/section.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,36 @@ local vinyl = import 'panels/vinyl.libsonnet';
job=job,
),

net.requests_in_progress_per_second(
datasource=datasource,
policy=policy,
measurement=measurement,
job=job,
rate_time_range=rate_time_range,
),

net.requests_in_progress_current(
datasource=datasource,
policy=policy,
measurement=measurement,
job=job,
),

net.requests_in_queue_per_second(
datasource=datasource,
policy=policy,
measurement=measurement,
job=job,
rate_time_range=rate_time_range,
),

net.requests_in_queue_current(
datasource=datasource,
policy=policy,
measurement=measurement,
job=job,
),

net.connections_per_second(
datasource=datasource,
policy=policy,
Expand Down
9 changes: 7 additions & 2 deletions example_cluster/project/app.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
FROM tarantool/tarantool:2.x-centos7
FROM centos:7

WORKDIR /app

RUN yum install -y git \
cmake \
make \
gcc \
gcc-c++
gcc-c++ \
unzip
COPY . .
RUN mkdir -p tmp

# Workaround for missing centos image for 2.10
RUN curl -L https://tarantool.io/OtKysgx/pre-release/2/installer.sh | bash
RUN yum install -y tarantool tarantool-devel

# https://github.com/tarantool/cartridge-cli#installation
RUN set -o pipefail && curl -L https://tarantool.io/installer.sh | bash -s -- --repo-only
RUN yum install -y cartridge-cli
Expand Down
9 changes: 7 additions & 2 deletions example_cluster/project/load.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
FROM tarantool/tarantool:2.x-centos7
FROM centos:7

WORKDIR /app

RUN yum install -y git \
cmake \
make \
gcc \
gcc-c++
gcc-c++ \
unzip
COPY . .

# Workaround for missing centos image for 2.10
RUN curl -L https://tarantool.io/OtKysgx/pre-release/2/installer.sh | bash
RUN yum install -y tarantool tarantool-devel

ENTRYPOINT tarantool ./generate_load.lua
2 changes: 1 addition & 1 deletion example_cluster/project/project-scm-1.rockspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies = {
'tarantool',
'lua >= 5.1',
'checks == 3.1.0-1',
'cartridge == 2.6.0-1',
'cartridge == 2.7.4-1',
'metrics == 0.13.0-1',
'cartridge-cli-extensions == 1.1.1-1',
}
Expand Down
Loading

0 comments on commit 27d39c4

Please sign in to comment.