diff --git a/grafana/scylla-detailed.template.json b/grafana/scylla-detailed.template.json index 2480d6f4e9..caacac9fcd 100644 --- a/grafana/scylla-detailed.template.json +++ b/grafana/scylla-detailed.template.json @@ -74,6 +74,53 @@ ], "title": "New row" }, + { + "class": "row", + "panels": [ + { + "class": "collapsible_row_panel", + "title": "Tablets information" + } + ] + }, + { + "class": "row", + "panels": [ + { + "title": "Tablet over time per [[by]]", + "type": "heatmap", + "class": "barchart_panel", + "gridPos": { + "h": 13, + "w": 24 + }, + "targets": [ + { + "refId": "A", + "expr": "sum(scylla_tablets_count{instance=~\"[[node]]\",cluster=~\"$cluster|$^\", dc=~\"$dc\", shard=~\"[[shard]]\"}) by([[by]])", + "range": false, + "format": "time_series", + "instant": false, + "legendFormat": "{{dc}} {{instance}} {{shard}}" + } + ] + }, + { + "title": "Tablet per [[by]]", + "class": "barchart_panel", + "span": 12, + "targets": [ + { + "refId": "A", + "expr": "sum(scylla_tablets_count{instance=~\"[[node]]\",cluster=~\"$cluster|$^\", dc=~\"$dc\", shard=~\"[[shard]]\"}) by([[by]])", + "range": false, + "legendFormat": "__auto", + "instant": true, + "format": "table" + } + ] + } + ]}, { "class": "row", "panels": [ diff --git a/grafana/scylla-ks.template.json b/grafana/scylla-ks.template.json index 276ef0dede..210718df17 100644 --- a/grafana/scylla-ks.template.json +++ b/grafana/scylla-ks.template.json @@ -32,6 +32,44 @@ } ] }, + { + "class": "row", + "panels": [ + { + "title": "Tablet over time per [[by]]", + "type": "heatmap", + "class": "barchart_panel", + "gridPos": { + "h": 13, + "w": 24 + }, + "targets": [ + { + "refId": "A", + "expr": "sum(scylla_column_family_tablet_count{ks=\"$ks\", cf=\"$table\", instance=~\"[[node]]\",cluster=~\"$cluster|$^\", dc=~\"$dc\", shard=~\"[[shard]]|$\"}) by([[by]])", + "range": false, + "format": "time_series", + "instant": false, + "legendFormat": "{{dc}} {{instance}} {{shard}}" + } + ] + }, + { + "title": "Tablet per [[by]]", + "class": "barchart_panel", + "span": 12, + "targets": [ + { + "refId": "A", + "expr": "sum(scylla_column_family_tablet_count{ks=\"$ks\", cf=\"$table\",instance=~\"[[node]]\",cluster=~\"$cluster|$^\", dc=~\"$dc\", shard=~\"[[shard]]|$\"}) by([[by]])", + "range": false, + "legendFormat": "__auto", + "instant": true, + "format": "table" + } + ] + } + ]}, { "class": "row", "panels": [ diff --git a/grafana/types.json b/grafana/types.json index d4fa3e3729..c0eaf9f82f 100644 --- a/grafana/types.json +++ b/grafana/types.json @@ -1793,6 +1793,70 @@ } ] }, + "barchart_panel": { + "type": "barchart", + "class": "graph_panel", + "options": { + "orientation": "auto", + "xTickLabelRotation": 0, + "xTickLabelSpacing": 0, + "showValue": "always", + "stacking": "none", + "groupWidth": 0.7, + "barWidth": 0.89, + "barRadius": 0, + "fullHighlight": false, + "tooltip": { + "mode": "single", + "sort": "none" + }, + "legend": { + "showLegend": false, + "displayMode": "list", + "placement": "bottom", + "calcs": [] + } + }, + "fieldConfig": { + "defaults": { + "custom": { + "lineWidth": 1, + "fillOpacity": 80, + "gradientMode": "none", + "axisPlacement": "auto", + "axisLabel": "", + "axisColorMode": "text", + "axisBorderShow": false, + "scaleDistribution": { + "type": "linear" + }, + "axisCenteredZero": false, + "hideFrom": { + "tooltip": false, + "viz": false, + "legend": false + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "color": { + "mode": "palette-classic" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + } + }, "hidden_column":{ "type":"hidden" },