Skip to content

Commit a225559

Browse files
p0rtaleoleg-jukovec
authored andcommitted
dashboard: replace config application status panel with config checksum panel
1 parent 008ea57 commit a225559

File tree

6 files changed

+150
-199
lines changed

6 files changed

+150
-199
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
## [Unreleased]
88

99
### Added
10-
- Panel with Сartridge config application status (#241)
10+
- Panel with Сartridge configuration checksum (#242)
1111

1212

1313
## [3.2.1] - 2024-12-06

dashboard/panels/cluster.libsonnet

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -344,31 +344,26 @@ local prometheus = grafana.prometheus;
344344
else if cfg.type == variable.datasource_type.influxdb then
345345
error 'InfluxDB target is not supported yet',
346346

347-
config_applied(
347+
cartridge_config_checksum(
348348
cfg,
349-
title='Config application status',
349+
title='Configuration checksum',
350350
description=|||
351-
Indicates whether the instance has locally applied a new
352-
clusterwide configuration.
351+
Cartridge configuration checksum on the instance.
352+
Differences indicate configuration divergence across cluster nodes.
353353
354-
Panel minimal requirements: cartridge 2.16.1, metrics 1.4.0.
354+
Panel minimal requirements: metrics 1.5.0.
355355
|||,
356-
):: timeseries.new(
356+
):: common.default_graph(
357+
cfg,
357358
title=title,
358359
description=description,
359-
datasource=cfg.datasource,
360+
min=0,
361+
legend_avg=false,
362+
legend_max=false,
360363
panel_height=6,
361364
panel_width=8,
362-
max=1,
363-
min=0,
364-
).addValueMapping(
365-
0, 'yellow', 'not applied'
366-
).addValueMapping(
367-
1, 'green', 'applied'
368-
).addRangeMapping(
369-
0.001, 0.999, '-'
370365
).addTarget(
371-
common.target(cfg, 'tnt_cartridge_config_applied')
366+
common.target(cfg, 'tnt_cartridge_config_checksum', converter='last'),
372367
),
373368

374369
memory_reserved_stat(

dashboard/section.libsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ local vinyl = import 'dashboard/panels/vinyl.libsonnet';
6767
cluster.http_rps_stat(cfg) { gridPos: { w: 4, h: 5, x: 12, y: 4 } },
6868
cluster.net_rps_stat(cfg) { gridPos: { w: 4, h: 5, x: 16, y: 4 } },
6969
cluster.space_ops_stat(cfg) { gridPos: { w: 4, h: 5, x: 20, y: 4 } },
70-
cluster.config_applied(cfg),
70+
cluster.cartridge_config_checksum(cfg),
7171
cluster.cartridge_warning_issues(cfg),
7272
cluster.cartridge_critical_issues(cfg),
7373
cluster.failovers_per_second(cfg),

supported_metrics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ Based on [tarantool/metrics 1.2.0](https://github.com/tarantool/metrics/releases
121121
- [x] **tnt_cartridge_issues**: see *Cluster overview/Cartridge warning issues*, *Cluster overview/Cartridge critical issues* panels ([#55](https://github.com/tarantool/grafana-dashboard/pull/55))
122122
- **tnt_cartridge_cluster_issues**: unsupported (decided not to support: superseded by **tnt_cartridge_issues**)
123123
- [x] **tnt_cartridge_failover_trigger_total**: see *Cluster overview/Failovers triggered* panel ([#178](https://github.com/tarantool/grafana-dashboard/issues/178))
124-
- [x] **tnt_cartridge_config_applied**: see *Cluster overview/Config application status* panel ([#241](https://github.com/tarantool/grafana-dashboard/pull/241))
124+
- [x] **tnt_cartridge_config_checksum**: see *Cluster overview/Configuration checksum* panel ([#242](https://github.com/tarantool/grafana-dashboard/pull/242))
125125
- [x] **tnt_synchro_queue_owner**: see *Replication overview/Synchronous queue owner* panel ([#178](https://github.com/tarantool/grafana-dashboard/issues/178))
126126
- [x] **tnt_synchro_queue_term**: see *Replication overview/Synchronous queue term* panel ([#178](https://github.com/tarantool/grafana-dashboard/issues/178))
127127
- [x] **tnt_synchro_queue_len**: see *Replication overview/Synchronous queue transactions* panel ([#178](https://github.com/tarantool/grafana-dashboard/issues/178))

tests/Prometheus/dashboard_cartridge_compiled.json

Lines changed: 68 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -577,113 +577,91 @@
577577
"type": "stat"
578578
},
579579
{
580+
"aliasColors": { },
581+
"bars": false,
582+
"dashLength": 10,
583+
"dashes": false,
580584
"datasource": "$prometheus",
581-
"description": "Indicates whether the instance has locally applied a new\nclusterwide configuration.\n\nPanel minimal requirements: cartridge 2.16.1, metrics 1.4.0.\n",
582-
"fieldConfig": {
583-
"defaults": {
584-
"color": {
585-
"mode": "palette-classic"
586-
},
587-
"custom": {
588-
"axisLabel": "",
589-
"axisPlacement": "auto",
590-
"barAlignment": 0,
591-
"drawStyle": "line",
592-
"fillOpacity": 0,
593-
"gradientMode": "none",
594-
"hideFrom": {
595-
"legend": false,
596-
"tooltip": false,
597-
"viz": false
598-
},
599-
"lineInterpolation": "linear",
600-
"lineWidth": 1,
601-
"pointSize": 5,
602-
"scaleDistribution": {
603-
"type": "linear"
604-
},
605-
"showPoints": "never",
606-
"spanNulls": false,
607-
"stacking": {
608-
"group": "A",
609-
"mode": "none"
610-
},
611-
"thresholdsStyle": {
612-
"mode": "off"
613-
}
614-
},
615-
"mappings": [
616-
{
617-
"options": {
618-
"0": {
619-
"color": "yellow",
620-
"index": 0,
621-
"text": "not applied"
622-
}
623-
},
624-
"type": "value"
625-
},
626-
{
627-
"options": {
628-
"1": {
629-
"color": "green",
630-
"index": 0,
631-
"text": "applied"
632-
}
633-
},
634-
"type": "value"
635-
},
636-
{
637-
"options": {
638-
"from": 0.001,
639-
"result": {
640-
"index": 0,
641-
"text": "-"
642-
},
643-
"to": 0.999
644-
},
645-
"type": "range"
646-
}
647-
],
648-
"max": 1,
649-
"min": 0,
650-
"thresholds": {
651-
"mode": "absolute",
652-
"steps": [ ]
653-
}
654-
},
655-
"overrides": [ ]
656-
},
585+
"description": "Cartridge configuration checksum on the instance.\nDifferences indicate configuration divergence across cluster nodes.\n\nPanel minimal requirements: metrics 1.5.0.\n",
586+
"fill": 0,
657587
"gridPos": {
658588
"h": 6,
659589
"w": 8,
660590
"x": 0,
661591
"y": 9
662592
},
663593
"id": 10,
664-
"options": {
665-
"legend": {
666-
"calcs": [
667-
"last"
668-
],
669-
"displayMode": "table",
670-
"placement": "right"
671-
},
672-
"tooltip": {
673-
"mode": "multi"
674-
}
594+
"legend": {
595+
"alignAsTable": true,
596+
"avg": false,
597+
"current": true,
598+
"max": false,
599+
"min": false,
600+
"rightSide": false,
601+
"show": true,
602+
"sideWidth": null,
603+
"sort": "current",
604+
"sortDesc": true,
605+
"total": false,
606+
"values": true
675607
},
608+
"lines": true,
609+
"linewidth": 1,
610+
"links": [ ],
611+
"nullPointMode": "null",
612+
"percentage": false,
613+
"pointradius": 5,
614+
"points": false,
615+
"renderer": "flot",
616+
"repeat": null,
617+
"seriesOverrides": [ ],
618+
"spaceLength": 10,
619+
"stack": false,
620+
"steppedLine": false,
676621
"targets": [
677622
{
678-
"expr": "tnt_cartridge_config_applied{alias=~\"$alias\",job=~\"$job\"}",
623+
"expr": "tnt_cartridge_config_checksum{alias=~\"$alias\",job=~\"$job\"}",
679624
"format": "time_series",
680625
"intervalFactor": 2,
681626
"legendFormat": "{{alias}}",
682627
"refId": "A"
683628
}
684629
],
685-
"title": "Config application status",
686-
"type": "timeseries"
630+
"thresholds": [ ],
631+
"timeFrom": null,
632+
"timeShift": null,
633+
"title": "Configuration checksum",
634+
"tooltip": {
635+
"shared": true,
636+
"sort": 2,
637+
"value_type": "individual"
638+
},
639+
"type": "graph",
640+
"xaxis": {
641+
"buckets": null,
642+
"mode": "time",
643+
"name": null,
644+
"show": true,
645+
"values": [ ]
646+
},
647+
"yaxes": [
648+
{
649+
"format": "none",
650+
"label": null,
651+
"logBase": 1,
652+
"max": null,
653+
"min": 0,
654+
"show": true
655+
},
656+
{
657+
"format": "none",
658+
"label": null,
659+
"logBase": 1,
660+
"max": null,
661+
"min": 0,
662+
"show": true
663+
}
664+
]
687665
},
688666
{
689667
"aliasColors": { },

0 commit comments

Comments
 (0)