@@ -135,8 +135,83 @@ local utils = import 'mixin-utils/utils.libsonnet';
135135        $.latencyPanel('cortex_ingester_client_request_duration_seconds' , '{%s, operation="/cortex.Ingester/QueryStream"}'  % $.jobMatcher('ruler' ))
136136      )
137137    )
138+     .addRowIf(
139+       std.member($._config.storage_engine, 'chunks' ),
140+       $.row('Ruler - Chunks storage - Index Cache' )
141+       .addPanel(
142+         $.panel('Total entries' ) +
143+         $.queryPanel('sum(querier_cache_added_new_total{cache="store.index-cache-read.fifocache",%s}) - sum(querier_cache_evicted_total{cache="store.index-cache-read.fifocache",%s})'  % [$.jobMatcher($._config.job_names.ruler), $.jobMatcher($._config.job_names.ruler)], 'Entries' ),
144+       )
145+       .addPanel(
146+         $.panel('Cache Hit %' ) +
147+         $.queryPanel('(sum(rate(querier_cache_gets_total{cache="store.index-cache-read.fifocache",%s}[1m])) - sum(rate(querier_cache_misses_total{cache="store.index-cache-read.fifocache",%s}[1m]))) / sum(rate(querier_cache_gets_total{cache="store.index-cache-read.fifocache",%s}[1m]))'  % [$.jobMatcher($._config.job_names.ruler), $.jobMatcher($._config.job_names.ruler), $.jobMatcher($._config.job_names.ruler)], 'hit rate' )
148+         { yaxes:  $.yaxes({ format:  'percentunit' , max:  1  }) },
149+       )
150+       .addPanel(
151+         $.panel('Churn Rate' ) +
152+         $.queryPanel('sum(rate(querier_cache_evicted_total{cache="store.index-cache-read.fifocache",%s}[1m]))'  % $.jobMatcher($._config.job_names.ruler), 'churn rate' ),
153+       )
154+     )
155+     .addRowIf(
156+       std.member($._config.storage_engine, 'chunks' ),
157+       $.row('Ruler - Chunks storage - Store' )
158+       .addPanel(
159+         $.panel('Index Lookups per Query' ) +
160+         utils.latencyRecordingRulePanel('cortex_chunk_store_index_lookups_per_query' , $.jobSelector($._config.job_names.ruler), multiplier=1 ) +
161+         { yaxes:  $.yaxes('short' ) },
162+       )
163+       .addPanel(
164+         $.panel('Series (pre-intersection) per Query' ) +
165+         utils.latencyRecordingRulePanel('cortex_chunk_store_series_pre_intersection_per_query' , $.jobSelector($._config.job_names.ruler), multiplier=1 ) +
166+         { yaxes:  $.yaxes('short' ) },
167+       )
168+       .addPanel(
169+         $.panel('Series (post-intersection) per Query' ) +
170+         utils.latencyRecordingRulePanel('cortex_chunk_store_series_post_intersection_per_query' , $.jobSelector($._config.job_names.ruler), multiplier=1 ) +
171+         { yaxes:  $.yaxes('short' ) },
172+       )
173+       .addPanel(
174+         $.panel('Chunks per Query' ) +
175+         utils.latencyRecordingRulePanel('cortex_chunk_store_chunks_per_query' , $.jobSelector($._config.job_names.ruler), multiplier=1 ) +
176+         { yaxes:  $.yaxes('short' ) },
177+       )
178+     )
179+     .addRowIf(
180+       std.member($._config.storage_engine, 'blocks' ),
181+       $.row('Ruler - Blocks storage' )
182+       .addPanel(
183+         $.panel('Number of store-gateways hit per Query' ) +
184+         $.latencyPanel('cortex_querier_storegateway_instances_hit_per_query' , '{%s}'  % $.jobMatcher($._config.job_names.ruler), multiplier=1 ) +
185+         { yaxes:  $.yaxes('short' ) },
186+       )
187+       .addPanel(
188+         $.panel('Refetches of missing blocks per Query' ) +
189+         $.latencyPanel('cortex_querier_storegateway_refetches_per_query' , '{%s}'  % $.jobMatcher($._config.job_names.ruler), multiplier=1 ) +
190+         { yaxes:  $.yaxes('short' ) },
191+       )
192+       .addPanel(
193+         $.panel('Consistency checks failed' ) +
194+         $.queryPanel('sum(rate(cortex_querier_blocks_consistency_checks_failed_total{%s}[1m])) / sum(rate(cortex_querier_blocks_consistency_checks_total{%s}[1m]))'  % [$.jobMatcher($._config.job_names.ruler), $.jobMatcher($._config.job_names.ruler)], 'Failure Rate' ) +
195+         { yaxes:  $.yaxes({ format:  'percentunit' , max:  1  }) },
196+       )
197+     )
138198    .addRow(
139-       $.row('Group Evaluations' )
199+       $.row('Notifications' )
200+       .addPanel(
201+         $.panel('Delivery Errors' ) +
202+         $.queryPanel($.rulerQueries.notifications.failure % [$.jobMatcher('ruler' ), $.jobMatcher('ruler' )], '{{ user }}' )
203+       )
204+       .addPanel(
205+         $.panel('Queue Length' ) +
206+         $.queryPanel($.rulerQueries.notifications.queue % [$.jobMatcher('ruler' ), $.jobMatcher('ruler' )], '{{ user }}' )
207+       )
208+       .addPanel(
209+         $.panel('Dropped' ) +
210+         $.queryPanel($.rulerQueries.notifications.dropped % $.jobMatcher('ruler' ), '{{ user }}' )
211+       )
212+     )
213+     .addRow(
214+       ($.row('Group Evaluations' ) + { collapse:  true  })
140215      .addPanel(
141216        $.panel('Missed Iterations' ) +
142217        $.queryPanel($.rulerQueries.groupEvaluations.missedIterations % $.jobMatcher('ruler' ), '{{ user }}' ),
@@ -156,28 +231,13 @@ local utils = import 'mixin-utils/utils.libsonnet';
156231      )
157232    )
158233    .addRow(
159-       $.row('Rule Evaluation per User' )
234+       ( $.row('Rule Evaluation per User' ) + {  collapse:   true  } )
160235      .addPanel(
161236        $.panel('Latency' ) +
162237        $.queryPanel(
163238          $.rulerQueries.perUserPerGroupEvaluations.latency % [$.jobMatcher('ruler' ), $.jobMatcher('ruler' )],
164239          '{{ user }}' 
165240        )
166241      )
167-     )
168-     .addRow(
169-       $.row('Notifications' )
170-       .addPanel(
171-         $.panel('Delivery Errors' ) +
172-         $.queryPanel($.rulerQueries.notifications.failure % [$.jobMatcher('ruler' ), $.jobMatcher('ruler' )], '{{ user }}' )
173-       )
174-       .addPanel(
175-         $.panel('Queue Length' ) +
176-         $.queryPanel($.rulerQueries.notifications.queue % [$.jobMatcher('ruler' ), $.jobMatcher('ruler' )], '{{ user }}' )
177-       )
178-       .addPanel(
179-         $.panel('Dropped' ) +
180-         $.queryPanel($.rulerQueries.notifications.dropped % $.jobMatcher('ruler' ), '{{ user }}' )
181-       )
182242    ),
183243}
0 commit comments