Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add panel Query Concurrency to dashboard mixin. #5542

Merged
merged 1 commit into from
Oct 27, 2022
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
95 changes: 92 additions & 3 deletions examples/dashboards/query.json
Original file line number Diff line number Diff line change
Expand Up @@ -1501,7 +1501,7 @@
"titleSize": "h6"
},
{
"collapse": true,
"collapse": false,
"height": "250px",
"panels": [
{
Expand All @@ -1510,6 +1510,7 @@
"dashLength": 10,
"dashes": false,
"datasource": "$datasource",
"description": "Shows available capacity of processing queries in parallel.",
"fill": 1,
"id": 15,
"legend": {
Expand All @@ -1531,6 +1532,94 @@
"renderer": "flot",
"seriesOverrides": [ ],
"spaceLength": 10,
"span": 12,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "max_over_time(thanos_query_concurrent_gate_queries_max{job=~\"$job\"}[$__rate_interval]) - avg_over_time(thanos_query_concurrent_gate_queries_in_flight{job=~\"$job\"}[$__rate_interval])",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "{{job}} - {{pod}}",
"legendLink": null,
"step": 10
}
],
"thresholds": [ ],
"timeFrom": null,
"timeShift": null,
"title": "Concurrent Capacity",
"tooltip": {
"shared": false,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": [ ]
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": 0,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": false
}
]
}
],
"repeat": null,
"repeatIteration": null,
"repeatRowId": null,
"showTitle": true,
"title": "Query Concurrency",
"titleSize": "h6"
},
{
"collapse": true,
"height": "250px",
"panels": [
{
"aliasColors": { },
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "$datasource",
"fill": 1,
"id": 16,
"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": 4,
"stack": false,
"steppedLine": false,
Expand Down Expand Up @@ -1627,7 +1716,7 @@
"dashes": false,
"datasource": "$datasource",
"fill": 1,
"id": 16,
"id": 17,
"legend": {
"avg": false,
"current": false,
Expand Down Expand Up @@ -1703,7 +1792,7 @@
"dashes": false,
"datasource": "$datasource",
"fill": 1,
"id": 17,
"id": 18,
"legend": {
"avg": false,
"current": false,
Expand Down
10 changes: 10 additions & 0 deletions mixin/dashboards/query.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,16 @@ local utils = import '../lib/utils.libsonnet';
)
)
)
.addRow(
g.row('Query Concurrency')
.addPanel(
g.panel('Concurrent Capacity', 'Shows available capacity of processing queries in parallel.') +
g.queryPanel(
'max_over_time(thanos_query_concurrent_gate_queries_max{%s}[$__rate_interval]) - avg_over_time(thanos_query_concurrent_gate_queries_in_flight{%s}[$__rate_interval])' % [thanos.query.dashboard.selector, thanos.query.dashboard.selector],
'{{job}} - {{pod}}'
)
)
)
.addRow(
g.resourceUtilizationRow(thanos.query.dashboard.selector, thanos.query.dashboard.dimensions)
),
Expand Down