chore(mixins): Remove redundant selector for ingesters (#14667)

pull/15103/head
Joao Marcal 1 year ago committed by GitHub
parent 3561fce225
commit fd6672e1ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 10
      production/loki-mixin/dashboards/loki-writes.libsonnet

@ -26,9 +26,6 @@ local utils = import 'mixin-utils/utils.libsonnet';
ingester_zone: if $._config.meta_monitoring.enabled ingester_zone: if $._config.meta_monitoring.enabled
then [utils.selector.re('job', '($namespace)/(partition-ingester-.*|ingester-zone-.*|%s-write|loki-single-binary)' % $._config.ssd.pod_prefix_matcher)] then [utils.selector.re('job', '($namespace)/(partition-ingester-.*|ingester-zone-.*|%s-write|loki-single-binary)' % $._config.ssd.pod_prefix_matcher)]
else [utils.selector.re('job', '($namespace)/%s' % (if $._config.ssd.enabled then '%s-write' % $._config.ssd.pod_prefix_matcher else '(ingester-zone.*|partition-ingester-.*)'))], else [utils.selector.re('job', '($namespace)/%s' % (if $._config.ssd.enabled then '%s-write' % $._config.ssd.pod_prefix_matcher else '(ingester-zone.*|partition-ingester-.*)'))],
any_ingester: if $._config.meta_monitoring.enabled
then [utils.selector.re('job', '($namespace)/(partition-ingester.*|ingester.*|%s-write|loki-single-binary)' % $._config.ssd.pod_prefix_matcher)]
else [utils.selector.re('job', '($namespace)/%s' % (if $._config.ssd.enabled then '%s-write' % $._config.ssd.pod_prefix_matcher else '(ingester.*|partition-ingester.*)'))],
}, },
local selector(matcherId) = local selector(matcherId) =
@ -41,7 +38,6 @@ local utils = import 'mixin-utils/utils.libsonnet';
distributorSelector:: selector('distributor'), distributorSelector:: selector('distributor'),
ingesterSelector:: selector('ingester'), ingesterSelector:: selector('ingester'),
ingesterZoneSelector:: selector('ingester_zone'), ingesterZoneSelector:: selector('ingester_zone'),
anyIngester:: selector('any_ingester'),
} + } +
$.dashboard('Loki / Writes', uid='writes') $.dashboard('Loki / Writes', uid='writes')
.addCluster() .addCluster()
@ -177,16 +173,16 @@ local utils = import 'mixin-utils/utils.libsonnet';
$.row('Index') $.row('Index')
.addPanel( .addPanel(
$.newQueryPanel('QPS') + $.newQueryPanel('QPS') +
$.newQpsPanel('loki_index_request_duration_seconds_count{%s operation="index_chunk"}' % dashboards['loki-writes.json'].anyIngester) $.newQpsPanel('loki_index_request_duration_seconds_count{%s operation="index_chunk"}' % dashboards['loki-writes.json'].ingesterSelector)
) )
.addPanel( .addPanel(
$.newQueryPanel('Latency', 'ms') + $.newQueryPanel('Latency', 'ms') +
$.latencyPanel('loki_index_request_duration_seconds', '{%s operation="index_chunk"}' % dashboards['loki-writes.json'].anyIngester) $.latencyPanel('loki_index_request_duration_seconds', '{%s operation="index_chunk"}' % dashboards['loki-writes.json'].ingesterSelector)
) )
.addPanel( .addPanel(
$.p99LatencyByPod( $.p99LatencyByPod(
'loki_index_request_duration_seconds', 'loki_index_request_duration_seconds',
'{%s operation="index_chunk"}' % dashboards['loki-writes.json'].anyIngester, '{%s operation="index_chunk"}' % dashboards['loki-writes.json'].ingesterSelector,
) )
) )
) )

Loading…
Cancel
Save