Skip to content

Commit 2124c88

Browse files
committed
dashboard: add panel for status
1 parent a225559 commit 2124c88

13 files changed

+4441
-3078
lines changed

dashboard/panels/cluster.libsonnet

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -744,6 +744,34 @@ local prometheus = grafana.prometheus;
744744
common.target(cfg, 'tnt_read_only', converter='last')
745745
),
746746

747+
schema_need_upgrade_status(
748+
cfg,
749+
title='Tarantool schema need upgrade status',
750+
description=|||
751+
"no need to upgrade schema" means the instance schema is up-to-date.
752+
"need to upgrade schema" means the instance schema is outdated; some functionality is unavailable.
753+
Call box.schema.upgrade on the instance.
754+
755+
Panel minimal requirements: metrics 1.6.0, Grafana 8.
756+
|||,
757+
panel_width=12,
758+
):: timeseries.new(
759+
title=title,
760+
description=description,
761+
datasource=cfg.datasource,
762+
panel_width=panel_width,
763+
max=1,
764+
min=0,
765+
).addValueMapping(
766+
0, 'green', 'no need to upgrade schema'
767+
).addValueMapping(
768+
1, 'red', 'need to upgrade schema'
769+
).addRangeMapping(
770+
0.001, 0.999, '-'
771+
).addTarget(
772+
common.target(cfg, 'tnt_schema_needs_upgrade', converter='last')
773+
),
774+
747775
local election_warning(description) = std.join(
748776
'\n',
749777
[description, |||

dashboard/section.libsonnet

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ local vinyl = import 'dashboard/panels/vinyl.libsonnet';
4040
cluster.tarantool3_config_status(cfg),
4141
cluster.tarantool3_config_warning_alerts(cfg),
4242
cluster.tarantool3_config_error_alerts(cfg),
43-
cluster.read_only_status(cfg, panel_width=24),
43+
cluster.read_only_status(cfg),
44+
cluster.schema_need_upgrade_status(cfg),
4445
cluster.election_state(cfg),
4546
cluster.election_vote(cfg),
4647
cluster.election_leader(cfg),
@@ -50,7 +51,8 @@ local vinyl = import 'dashboard/panels/vinyl.libsonnet';
5051
cluster.tarantool3_config_status(cfg),
5152
cluster.tarantool3_config_warning_alerts(cfg),
5253
cluster.tarantool3_config_error_alerts(cfg),
53-
cluster.read_only_status(cfg, panel_width=24),
54+
cluster.read_only_status(cfg),
55+
cluster.schema_need_upgrade_status(cfg),
5456
cluster.election_state(cfg),
5557
cluster.election_vote(cfg),
5658
cluster.election_leader(cfg),
@@ -76,6 +78,7 @@ local vinyl = import 'dashboard/panels/vinyl.libsonnet';
7678
cluster.election_vote(cfg),
7779
cluster.election_leader(cfg),
7880
cluster.election_term(cfg),
81+
cluster.schema_need_upgrade_status(cfg, panel_width=24),
7982
] else if cfg.type == variable.datasource_type.influxdb then [
8083
cluster.row,
8184
cluster.cartridge_warning_issues(cfg),
@@ -86,6 +89,7 @@ local vinyl = import 'dashboard/panels/vinyl.libsonnet';
8689
cluster.election_vote(cfg),
8790
cluster.election_leader(cfg),
8891
cluster.election_term(cfg),
92+
cluster.schema_need_upgrade_status(cfg, panel_width=24),
8993
],
9094

9195
replication_tarantool3(cfg):: [

example_cluster/tarantool3_project/app.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.22-bullseye
1+
FROM golang:1.24-bullseye
22

33
WORKDIR /app
44

@@ -22,7 +22,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt install -y git patch
2222
RUN git clone https://github.com/magefile/mage && \
2323
cd mage && \
2424
go run bootstrap.go
25-
RUN tt install tt master
25+
# RUN tt install tt master
2626

2727
RUN tt rocks make
2828
ENTRYPOINT tt start -i

0 commit comments

Comments
 (0)