Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
17 changes: 16 additions & 1 deletion cortex-mixin/alerts/alerts.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,22 @@
},
annotations: {
message: |||
There are {{ $value }} queued up queries.
There are {{ $value }} queued up queries in query-frontend.
|||,
},
},
{
alert: 'CortexSchedulerQueriesStuck',
expr: |||
sum by (%s) (cortex_query_scheduler_queue_length) > 1
||| % $._config.alert_aggregation_labels,
'for': '5m', // We don't want to block for longer.
labels: {
severity: 'critical',
},
annotations: {
message: |||
There are {{ $value }} queued up queries in query-scheduler.
|||,
},
},
Expand Down
1 change: 1 addition & 0 deletions cortex-mixin/config.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
querier: '(querier|cortex$)',
ruler: '(ruler|cortex$)',
query_frontend: '(query-frontend|cortex$)',
query_scheduler: 'query-scheduler', // Not part of single-binary.
table_manager: '(table-manager|cortex$)',
store_gateway: '(store-gateway|cortex$)',
gateway: 'cortex-gw',
Expand Down
11 changes: 11 additions & 0 deletions cortex-mixin/dashboards/queries.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ local utils = import 'mixin-utils/utils.libsonnet';
$.queryPanel('cortex_query_frontend_queue_length{%s}' % $.jobMatcher($._config.job_names.query_frontend), '{{cluster}} / {{namespace}} / {{instance}}'),
)
)
.addRow(
$.row('Query Scheduler')
.addPanel(
$.panel('Queue Duration') +
$.latencyPanel('cortex_query_scheduler_queue_duration_seconds', '{%s}' % $.jobMatcher($._config.job_names.query_scheduler)),
)
.addPanel(
$.panel('Queue Length') +
$.queryPanel('cortex_query_scheduler_queue_length{%s}' % $.jobMatcher($._config.job_names.query_scheduler), '{{cluster}} / {{namespace}} / {{instance}}'),
)
)
.addRow(
$.row('Query Frontend - Results Cache')
.addPanel(
Expand Down
12 changes: 12 additions & 0 deletions cortex-mixin/dashboards/reads-resources.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,18 @@ local utils = import 'mixin-utils/utils.libsonnet';
$.goHeapInUsePanel('Memory (go heap inuse)', 'query-frontend'),
)
)
.addRow(
$.row('Query Scheduler')
.addPanel(
$.containerCPUUsagePanel('CPU', 'query-scheduler'),
)
.addPanel(
$.containerMemoryWorkingSetPanel('Memory (workingset)', 'query-scheduler'),
)
.addPanel(
$.goHeapInUsePanel('Memory (go heap inuse)', 'query-scheduler'),
)
)
.addRow(
$.row('Querier')
.addPanel(
Expand Down
11 changes: 11 additions & 0 deletions cortex-mixin/dashboards/reads.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,17 @@ local utils = import 'mixin-utils/utils.libsonnet';
{ yaxes: $.yaxes('s') }
)
)
.addRow(
$.row('Query Scheduler')
.addPanel(
$.panel('QPS') +
$.qpsPanel('cortex_query_scheduler_queue_duration_seconds_count{%s}' % $.jobMatcher($._config.job_names.query_scheduler))
)
.addPanel(
$.panel('Latency (Time in Queue)') +
$.latencyPanel('cortex_query_scheduler_queue_duration_seconds', '{%s}' % $.jobMatcher($._config.job_names.query_scheduler))
)
)
.addRow(
$.row('Cache - Query Results')
.addPanel(
Expand Down