Skip to content

Commit

Permalink
fix: text replacements, repair addRows
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenjaneczek committed Jun 10, 2021
1 parent 4642b5c commit 77f8609
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 31 deletions.
4 changes: 2 additions & 2 deletions cortex-mixin/dashboards/dashboard-utils.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
else self,

addRows(rows)::
addRowsIf(true, rows),
self.addRowsIf(true, rows),

addClusterSelectorTemplates(multi=true)::
local d = self {
Expand Down Expand Up @@ -379,7 +379,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
)
)
.addPanel(
$.panel('QPS') +
$.panel('Requests Per Second') +
$.queryPanel(
|||
sum by(operation) (
Expand Down
36 changes: 17 additions & 19 deletions cortex-mixin/dashboards/reads.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
.addRow(
$.row('Gateway')
.addPanel(
$.panel('QPS') +
$.panel('Requests Per Second') +
$.qpsPanel('cortex_request_duration_seconds_count{%s, route=~"(prometheus|api_prom)_api_v1_.+"}' % $.jobMatcher($._config.job_names.gateway)) +
$.panelDescriptionRps('gateway')
)
Expand All @@ -111,7 +111,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
.addRow(
$.row('Query Frontend')
.addPanel(
$.panel('QPS') +
$.panel('Requests Per Second') +
$.qpsPanel('cortex_request_duration_seconds_count{%s, route=~"(prometheus|api_prom)_api_v1_.+"}' % $.jobMatcher($._config.job_names.query_frontend)) +
$.panelDescriptionRps('query frontend')
)
Expand Down Expand Up @@ -146,7 +146,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
)
)
.addPanel(
$.panel('QPS') +
$.panel('Requests Per Second') +
$.qpsPanel('cortex_query_scheduler_queue_duration_seconds_count{%s}' % $.jobMatcher($._config.job_names.query_scheduler)) +
$.panelDescriptionRps('query scheduler')
)
Expand All @@ -161,16 +161,14 @@ local utils = import 'mixin-utils/utils.libsonnet';
.addPanel(
$.textPanel('', |||
<p>
The query results is an optional service is one of 4
optional caches that can be deployed as part of a Cortex
cluster to improve query performance.
It is used by the query-frontend to cache entire results
of queries.
The query results cache is one of 4 optional caches
that can be deployed as part of a GEM cluster to improve query performance.
It is used by the query-frontend to cache entire results of queries.
</p>
|||)
)
.addPanel(
$.panel('QPS') +
$.panel('Requests Per Second') +
$.qpsPanel('cortex_cache_request_duration_seconds_count{method=~"frontend.+", %s}' % $.jobMatcher($._config.job_names.query_frontend)) +
$.panelDescriptionRps('query results')
)
Expand All @@ -183,7 +181,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
.addRow(
$.row('Querier')
.addPanel(
$.panel('QPS') +
$.panel('Requests Per Second') +
$.qpsPanel('cortex_querier_request_duration_seconds_count{%s, route=~"(prometheus|api_prom)_api_v1_.+"}' % $.jobMatcher($._config.job_names.querier)) +
$.panelDescriptionRps(
'querier'
Expand Down Expand Up @@ -217,7 +215,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
)
)
.addPanel(
$.panel('QPS') +
$.panel('Requests Per Second') +
$.qpsPanel('cortex_request_duration_seconds_count{%s,route=~"/cortex.Ingester/Query(Stream)?|/cortex.Ingester/MetricsForLabelMatchers|/cortex.Ingester/LabelValues|/cortex.Ingester/MetricsMetadata"}' % $.jobMatcher($._config.job_names.ingester)) +
$.panelDescriptionRps('ingester')
)
Expand Down Expand Up @@ -252,7 +250,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
)
)
.addPanel(
$.panel('QPS') +
$.panel('Requests Per Second') +
$.qpsPanel('cortex_request_duration_seconds_count{%s,route=~"/gatewaypb.StoreGateway/.*"}' % $.jobMatcher($._config.job_names.store_gateway)) +
$.panelDescriptionRps('store gateway')
)
Expand All @@ -274,7 +272,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
std.member($._config.storage_engine, 'chunks'),
$.row('Memcached - Chunks storage - Index')
.addPanel(
$.panel('QPS') +
$.panel('Requests Per Second') +
$.qpsPanel('cortex_cache_request_duration_seconds_count{%s,method="store.index-cache-read.memcache.fetch"}' % $.jobMatcher($._config.job_names.querier))
)
.addPanel(
Expand All @@ -286,7 +284,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
std.member($._config.storage_engine, 'chunks'),
$.row('Memcached - Chunks storage - Chunks')
.addPanel(
$.panel('QPS') +
$.panel('Requests Per Second') +
$.qpsPanel('cortex_cache_request_duration_seconds_count{%s,method="chunksmemcache.fetch"}' % $.jobMatcher($._config.job_names.querier))
)
.addPanel(
Expand All @@ -310,7 +308,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
)
)
.addPanel(
$.panel('QPS') +
$.panel('Requests Per Second') +
$.queryPanel(
|||
sum by(operation) (
Expand Down Expand Up @@ -430,7 +428,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
std.member($._config.chunk_index_backend + $._config.chunk_store_backend, 'cassandra'),
$.row('Cassandra')
.addPanel(
$.panel('QPS') +
$.panel('Requests Per Second') +
$.qpsPanel('cortex_cassandra_request_duration_seconds_count{%s, operation="SELECT"}' % $.jobMatcher($._config.job_names.querier))
)
.addPanel(
Expand All @@ -443,7 +441,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
std.member($._config.chunk_index_backend + $._config.chunk_store_backend, 'bigtable'),
$.row('BigTable')
.addPanel(
$.panel('QPS') +
$.panel('Requests Per Second') +
$.qpsPanel('cortex_bigtable_request_duration_seconds_count{%s, operation="/google.bigtable.v2.Bigtable/ReadRows"}' % $.jobMatcher($._config.job_names.querier))
)
.addPanel(
Expand All @@ -456,7 +454,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
std.member($._config.chunk_index_backend + $._config.chunk_store_backend, 'dynamodb'),
$.row('DynamoDB')
.addPanel(
$.panel('QPS') +
$.panel('Requests Per Second') +
$.qpsPanel('cortex_dynamo_request_duration_seconds_count{%s, operation="DynamoDB.QueryPages"}' % $.jobMatcher($._config.job_names.querier))
)
.addPanel(
Expand All @@ -469,7 +467,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
std.member($._config.chunk_store_backend, 'gcs'),
$.row('GCS')
.addPanel(
$.panel('QPS') +
$.panel('Requests Per Second') +
$.qpsPanel('cortex_gcs_request_duration_seconds_count{%s, operation="GET"}' % $.jobMatcher($._config.job_names.querier))
)
.addPanel(
Expand Down
20 changes: 10 additions & 10 deletions cortex-mixin/dashboards/writes.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
.addRow(
$.row('Gateway')
.addPanel(
$.panel('QPS') +
$.panel('Requests Per Second') +
$.qpsPanel('cortex_request_duration_seconds_count{%s, route=~"api_(v1|prom)_push"}' % $.jobMatcher($._config.job_names.gateway)) +
$.panelDescriptionRps('gateway')
)
Expand All @@ -82,7 +82,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
.addRow(
$.row('Distributor')
.addPanel(
$.panel('QPS') +
$.panel('Requests Per Second') +
$.qpsPanel('cortex_request_duration_seconds_count{%s, route=~"/distributor.Distributor/Push|/httpgrpc.*|api_(v1|prom)_push"}' % $.jobMatcher($._config.job_names.distributor)) +
$.panelDescriptionRps('distributor')
)
Expand All @@ -103,7 +103,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
.addRow(
$.row('KV Store (HA Dedupe)')
.addPanel(
$.panel('QPS') +
$.panel('Requests Per Second') +
$.qpsPanel('cortex_kv_request_duration_seconds_count{%s}' % $.jobMatcher($._config.job_names.distributor)) +
$.panelDescriptionRpsKvStoreDedupe()
)
Expand All @@ -116,7 +116,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
.addRow(
$.row('Ingester')
.addPanel(
$.panel('QPS') +
$.panel('Requests Per Second') +
$.qpsPanel('cortex_request_duration_seconds_count{%s,route="/cortex.Ingester/Push"}' % $.jobMatcher($._config.job_names.ingester)) +
$.panelDescriptionRps('ingester')
)
Expand All @@ -137,7 +137,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
.addRow(
$.row('KV Store (Ring)')
.addPanel(
$.panel('QPS') +
$.panel('Requests Per Second') +
$.qpsPanel('cortex_kv_request_duration_seconds_count{%s}' % $.jobMatcher($._config.job_names.ingester)) +
$.panelDescriptionRpsKvStoreRing()
)
Expand All @@ -151,7 +151,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
std.member($._config.storage_engine, 'chunks'),
$.row('Memcached')
.addPanel(
$.panel('QPS') +
$.panel('Requests Per Second') +
$.qpsPanel('cortex_memcache_request_duration_seconds_count{%s,method="Memcache.Put"}' % $.jobMatcher($._config.job_names.ingester))
)
.addPanel(
Expand All @@ -164,7 +164,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
std.member($._config.chunk_index_backend + $._config.chunk_store_backend, 'cassandra'),
$.row('Cassandra')
.addPanel(
$.panel('QPS') +
$.panel('Requests Per Second') +
$.qpsPanel('cortex_cassandra_request_duration_seconds_count{%s, operation="INSERT"}' % $.jobMatcher($._config.job_names.ingester))
)
.addPanel(
Expand All @@ -177,7 +177,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
std.member($._config.chunk_index_backend + $._config.chunk_store_backend, 'bigtable'),
$.row('BigTable')
.addPanel(
$.panel('QPS') +
$.panel('Requests Per Second') +
$.qpsPanel('cortex_bigtable_request_duration_seconds_count{%s, operation="/google.bigtable.v2.Bigtable/MutateRows"}' % $.jobMatcher($._config.job_names.ingester))
)
.addPanel(
Expand All @@ -190,7 +190,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
std.member($._config.chunk_index_backend + $._config.chunk_store_backend, 'dynamodb'),
$.row('DynamoDB')
.addPanel(
$.panel('QPS') +
$.panel('Requests Per Second') +
$.qpsPanel('cortex_dynamo_request_duration_seconds_count{%s, operation="DynamoDB.BatchWriteItem"}' % $.jobMatcher($._config.job_names.ingester))
)
.addPanel(
Expand All @@ -203,7 +203,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
std.member($._config.chunk_store_backend, 'gcs'),
$.row('GCS')
.addPanel(
$.panel('QPS') +
$.panel('Requests Per Second') +
$.qpsPanel('cortex_gcs_request_duration_seconds_count{%s, operation="POST"}' % $.jobMatcher($._config.job_names.ingester))
)
.addPanel(
Expand Down

0 comments on commit 77f8609

Please sign in to comment.