Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added
- Panel with CRUD safe mode status (#249)
- Panel with time of last CRUD router cache clear (#250)

### Changed

Expand Down
55 changes: 52 additions & 3 deletions dashboard/panels/crud.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ local tuples_panel(
min=0,
labelY1='tuples per request',
panel_height=8,
panel_width=6,
panel_width=8,
).addTarget(
if cfg.type == variable.datasource_type.prometheus then
local filters = common.prometheus_query_filters(cfg.filters { operation: ['=', 'select'] });
Expand Down Expand Up @@ -399,7 +399,7 @@ local module = {

Panel minimal requirements: CRUD 1.7.2.
|||,
panel_width=6,
panel_width=12,
):: timeseries.new(
title=title,
description=description,
Expand All @@ -417,6 +417,55 @@ local module = {
common.target(cfg, 'tnt_crud_storage_safe_mode_enabled'),
),

router_cache_clear(
cfg,
title='Router cache last cleared',
description=|||
How long ago the route cache was last cleared on router instance.

Panel minimal requirements: CRUD 1.7.3.
|||,
):: common.default_graph(
cfg,
title=title,
description=description,
panel_width=12,
format='dateTimeFromNow',
legend_avg=false,
legend_max=false,
).addTarget(
if cfg.type == variable.datasource_type.prometheus then
prometheus.target(
expr=std.format(
|||
(
%(metrics_prefix)stnt_crud_router_cache_clear_ts{%(filters)s}
and
%(metrics_prefix)stnt_crud_router_cache_clear_ts{%(filters)s} > 0
) * 1000
|||,
{
metrics_prefix: cfg.metrics_prefix,
filters: common.prometheus_query_filters(cfg.filters),
}
),
legendFormat='{{alias}}'
)
else if cfg.type == variable.datasource_type.influxdb then
influxdb.target(
policy=cfg.policy,
measurement=cfg.measurement,
alias='$tag_label_pairs_alias',
group_tags=['label_pairs_alias'],
fill='none',
)
.where('metric_name', '=', std.format('%s%s', [cfg.metrics_prefix, 'tnt_crud_router_cache_clear_ts']))
.where('value', '>', '0')
.selectField('value')
.addConverter('last')
.addConverter('math', ['*1000'])
),

select_success_rps(
cfg,
title=null,
Expand Down Expand Up @@ -505,7 +554,7 @@ local module = {
min=0,
labelY1='requests per second',
panel_height=8,
panel_width=6,
panel_width=8,
).addTarget(
common.target(
cfg,
Expand Down
1 change: 1 addition & 0 deletions dashboard/section.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ local vinyl = import 'dashboard/panels/vinyl.libsonnet';
crud(cfg):: [
crud.row,
crud.safe_mode_enabled(cfg),
crud.router_cache_clear(cfg),
crud.select_success_rps(cfg),
crud.select_success_latency(cfg),
crud.select_error_rps(cfg),
Expand Down
1 change: 1 addition & 0 deletions supported_metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ Based on [tarantool/metrics 1.6.1](https://github.com/tarantool/metrics/releases
# tarantool/crud

- [x] **tnt_crud_storage_safe_mode_enabled**: see *CRUD module statistics/Safe mode status* panel ([#249](https://github.com/tarantool/grafana-dashboard/pull/249))
- [x] **tnt_crud_router_cache_clear_ts**: see *CRUD module statistics/Router cache last cleared* panel ([#250](https://github.com/tarantool/grafana-dashboard/pull/250))

Based on [tarantool/crud 1.5.2](https://github.com/tarantool/crud/releases/tag/1.5.2).

Expand Down
Loading