Skip to content

Commit

Permalink
dashboard: add panels for CRUD module statistics
Browse files Browse the repository at this point in the history
Statistics for CRUD module was introduced in CRUD 0.11.0 [1].
To enable statistics integrated with metrics with quantiles, call

  crud.cfg{
      stats = true,
      stats_driver = 'metrics',
      stats_quantiles = true
  }

This patch adds panels for
- tnt_crud_stats summary (+ tnt_crud_stats_count, tnt_crud_stats_sum)
- tnt_crud_tuples_fetched
- tnt_crud_tuples_lookup
- tnt_crud_map_reduces

CRUD panels are stored in "CRUD module statistics" section.
There is a group of panels for RPS load and a group of panels with
latency, both consists of separate panels for each operation
and ok/error status. Tuples panels are displayed as average per request.
InfluxDB queries for tuple panels have minor issue: they can show
0 current value from time to time due to `fill(0)` and `GROUP BY`
including partial intervals [2]. Map reduces panel show average RPS.

1. https://github.com/tarantool/crud/releases/tag/0.11.0
2. influxdata/influxdb#8244

Closes #143
  • Loading branch information
DifferentialOrange committed May 17, 2022
1 parent d533840 commit 03dc742
Show file tree
Hide file tree
Showing 10 changed files with 24,631 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased

### Added
- Panels for CRUD module statistics

### Changed
- Set default InfluxDB policy to `autogen`
Expand Down
6 changes: 6 additions & 0 deletions dashboard/influxdb_dashboard.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,10 @@ dashboard.new(
policy=variable.influxdb.policy,
measurement=variable.influxdb.measurement,
)
).addPanels(
section.crud(
datasource=variable.datasource.influxdb,
policy=variable.influxdb.policy,
measurement=variable.influxdb.measurement,
)
)
14 changes: 14 additions & 0 deletions dashboard/panels/common.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,18 @@ local prometheus = grafana.prometheus;
std.join('\n\n', [description, "If `No data` displayed, check up your 'rate_time_range' variable."])
else
description,

group_by_fill_0_warning(
description,
datasource='${DS_INFLUXDB}'
)::
if datasource == '${DS_INFLUXDB}' then
std.join('\n', [description, |||
Current value may be 0 from time to time due to fill(0)
and GROUP BY including partial intervals.
Refer to https://github.com/influxdata/influxdb/issues/8244
for updates.
|||])
else
description,
}
Loading

0 comments on commit 03dc742

Please sign in to comment.