Skip to content

Commit

Permalink
Store: add data touched by type to the dashboard (#5838)
Browse files Browse the repository at this point in the history
* Store: add data touched by type to the dashboard

Signed-off-by: Douglas Camata <159076+douglascamata@users.noreply.github.com>

* Fix captions for data fetched and touched widgets

Signed-off-by: Douglas Camata <159076+douglascamata@users.noreply.github.com>

Signed-off-by: Douglas Camata <159076+douglascamata@users.noreply.github.com>
  • Loading branch information
douglascamata authored Nov 25, 2022
1 parent 894ec8a commit 46873aa
Show file tree
Hide file tree
Showing 2 changed files with 126 additions and 17 deletions.
119 changes: 106 additions & 13 deletions examples/dashboards/store.json
Original file line number Diff line number Diff line change
Expand Up @@ -1760,7 +1760,7 @@
"renderer": "flot",
"seriesOverrides": [ ],
"spaceLength": 10,
"span": 4,
"span": 3,
"stack": false,
"steppedLine": false,
"targets": [
Expand Down Expand Up @@ -1853,31 +1853,31 @@
"renderer": "flot",
"seriesOverrides": [ ],
"spaceLength": 10,
"span": 4,
"span": 3,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "thanos_bucket_store_series_data_fetched{job=~\"$job\", quantile=\"0.99\"}",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "P99",
"legendFormat": "P99: {{data_type}} / {{job}}",
"legendLink": null,
"step": 10
},
{
"expr": "sum by (job) (rate(thanos_bucket_store_series_data_fetched_sum{job=~\"$job\"}[$interval])) / sum by (job) (rate(thanos_bucket_store_series_data_fetched_count{job=~\"$job\"}[$interval]))",
"expr": "sum by (job, data_type) (rate(thanos_bucket_store_series_data_fetched_sum{job=~\"$job\"}[$interval])) / sum by (job, data_type) (rate(thanos_bucket_store_series_data_fetched_count{job=~\"$job\"}[$interval]))",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "mean {{job}}",
"legendFormat": "mean: {{data_type}} / {{job}}",
"legendLink": null,
"step": 10
},
{
"expr": "thanos_bucket_store_series_data_fetched{job=~\"$job\", quantile=\"0.50\"}",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "P50",
"legendFormat": "P50: {{data_type}} / {{job}}",
"legendLink": null,
"step": 10
}
Expand Down Expand Up @@ -1924,6 +1924,7 @@
"dashLength": 10,
"dashes": false,
"datasource": "$datasource",
"description": "Show the size of data touched",
"fill": 1,
"id": 21,
"legend": {
Expand All @@ -1945,7 +1946,99 @@
"renderer": "flot",
"seriesOverrides": [ ],
"spaceLength": 10,
"span": 4,
"span": 3,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "thanos_bucket_store_series_data_touched{job=~\"$job\", quantile=\"0.99\"}",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "P99: {{data_type}} / {{job}}",
"legendLink": null,
"step": 10
},
{
"expr": "sum by (job, data_type) (rate(thanos_bucket_store_series_data_touched_sum{job=~\"$job\"}[$interval])) / sum by (job, data_type) (rate(thanos_bucket_store_series_data_touched_count{job=~\"$job\"}[$interval]))",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "mean: {{data_type}} / {{job}}",
"legendLink": null,
"step": 10
},
{
"expr": "thanos_bucket_store_series_data_touched{job=~\"$job\", quantile=\"0.50\"}",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "P50: {{data_type}} / {{job}}",
"legendLink": null,
"step": 10
}
],
"thresholds": [ ],
"timeFrom": null,
"timeShift": null,
"title": "Data Touched",
"tooltip": {
"shared": false,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": [ ]
},
"yaxes": [
{
"format": "bytes",
"label": null,
"logBase": 1,
"max": null,
"min": 0,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": false
}
]
},
{
"aliasColors": { },
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "$datasource",
"fill": 1,
"id": 22,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"links": [ ],
"nullPointMode": "null as zero",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [ ],
"spaceLength": 10,
"span": 3,
"stack": false,
"steppedLine": false,
"targets": [
Expand Down Expand Up @@ -2030,7 +2123,7 @@
"datasource": "$datasource",
"description": "Shows how long has it taken to get all series.",
"fill": 1,
"id": 22,
"id": 23,
"legend": {
"avg": false,
"current": false,
Expand Down Expand Up @@ -2148,7 +2241,7 @@
"datasource": "$datasource",
"description": "Shows how long has it taken to merge series.",
"fill": 1,
"id": 23,
"id": 24,
"legend": {
"avg": false,
"current": false,
Expand Down Expand Up @@ -2266,7 +2359,7 @@
"datasource": "$datasource",
"description": "Shows how long has it taken for a series to wait at the gate.",
"fill": 1,
"id": 24,
"id": 25,
"legend": {
"avg": false,
"current": false,
Expand Down Expand Up @@ -2395,7 +2488,7 @@
"dashes": false,
"datasource": "$datasource",
"fill": 1,
"id": 25,
"id": 26,
"legend": {
"avg": false,
"current": false,
Expand Down Expand Up @@ -2511,7 +2604,7 @@
"dashes": false,
"datasource": "$datasource",
"fill": 1,
"id": 26,
"id": 27,
"legend": {
"avg": false,
"current": false,
Expand Down Expand Up @@ -2587,7 +2680,7 @@
"dashes": false,
"datasource": "$datasource",
"fill": 1,
"id": 27,
"id": 28,
"legend": {
"avg": false,
"current": false,
Expand Down
24 changes: 20 additions & 4 deletions mixin/dashboards/store.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ local utils = import '../lib/utils.libsonnet';
[if thanos.store != null then 'store.json']:
local grpcUnarySelector = utils.joinLabels([thanos.store.dashboard.selector, 'grpc_type="unary"']);
local grpcServerStreamSelector = utils.joinLabels([thanos.store.dashboard.selector, 'grpc_type="server_stream"']);
local dataSizeDimensions = utils.joinLabels([thanos.store.dashboard.dimensions, 'data_type']);

g.dashboard(thanos.store.title)
.addRow(
Expand Down Expand Up @@ -181,12 +182,27 @@ local utils = import '../lib/utils.libsonnet';
g.queryPanel(
[
'thanos_bucket_store_series_data_fetched{%s, quantile="0.99"}' % thanos.store.dashboard.selector,
'sum by (%(dimensions)s) (rate(thanos_bucket_store_series_data_fetched_sum{%(selector)s}[$interval])) / sum by (%(dimensions)s) (rate(thanos_bucket_store_series_data_fetched_count{%(selector)s}[$interval]))' % thanos.store.dashboard,
'sum by (%s) (rate(thanos_bucket_store_series_data_fetched_sum{%s}[$interval])) / sum by (%s) (rate(thanos_bucket_store_series_data_fetched_count{%s}[$interval]))' % [dataSizeDimensions, thanos.store.dashboard.selector, dataSizeDimensions, thanos.store.dashboard.selector],
'thanos_bucket_store_series_data_fetched{%s, quantile="0.50"}' % thanos.store.dashboard.selector,
], [
'P99',
'mean {{job}}',
'P50',
'P99: {{data_type}} / {{job}}',
'mean: {{data_type}} / {{job}}',
'P50: {{data_type}} / {{job}}',
],
) +
{ yaxes: g.yaxes('bytes') }
)
.addPanel(
g.panel('Data Touched', 'Show the size of data touched') +
g.queryPanel(
[
'thanos_bucket_store_series_data_touched{%s, quantile="0.99"}' % thanos.store.dashboard.selector,
'sum by (%s) (rate(thanos_bucket_store_series_data_touched_sum{%s}[$interval])) / sum by (%s) (rate(thanos_bucket_store_series_data_touched_count{%s}[$interval]))' % [dataSizeDimensions, thanos.store.dashboard.selector, dataSizeDimensions, thanos.store.dashboard.selector],
'thanos_bucket_store_series_data_touched{%s, quantile="0.50"}' % thanos.store.dashboard.selector,
], [
'P99: {{data_type}} / {{job}}',
'mean: {{data_type}} / {{job}}',
'P50: {{data_type}} / {{job}}',
],
) +
{ yaxes: g.yaxes('bytes') }
Expand Down

0 comments on commit 46873aa

Please sign in to comment.