From 372b90aa97bc4883430f12889cf6d07f88bc337f Mon Sep 17 00:00:00 2001 From: Michael Tweten Date: Thu, 9 Jan 2025 11:54:50 -0600 Subject: [PATCH] Add pod prefix to partition-ingester --- production/loki-mixin/dashboards/loki-operational.libsonnet | 4 ++-- .../loki-mixin/dashboards/loki-reads-resources.libsonnet | 2 +- .../loki-mixin/dashboards/loki-writes-resources.libsonnet | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/production/loki-mixin/dashboards/loki-operational.libsonnet b/production/loki-mixin/dashboards/loki-operational.libsonnet index 8d242c581bce8..95de71bce2fd5 100644 --- a/production/loki-mixin/dashboards/loki-operational.libsonnet +++ b/production/loki-mixin/dashboards/loki-operational.libsonnet @@ -53,8 +53,8 @@ local utils = import 'mixin-utils/utils.libsonnet'; then [utils.selector.re('pod', '(%sdistributor|%s-write|loki-single-binary)' % [$._config.pod_prefix_matcher, $._config.ssd.pod_prefix_matcher])] else [utils.selector.re('pod', '%s' % (if $._config.ssd.enabled then '%s-write.*' % $._config.ssd.pod_prefix_matcher else '%sdistributor.*' % $._config.pod_prefix_matcher))], ingester: if $._config.meta_monitoring.enabled - then [utils.selector.re('pod', '(partition-ingester.*|%singester|%s-write|loki-single-binary)' % [$._config.pod_prefix_matcher, $._config.ssd.pod_prefix_matcher])] - else [utils.selector.re('pod', '%s' % (if $._config.ssd.enabled then '%s-write.*' % $._config.ssd.pod_prefix_matcher else '(%singester.*|partition-ingester.*)' % $._config.pod_prefix_matcher))], + then [utils.selector.re('pod', '(%(pod_prefix)spartition-ingester.*|%(pod_prefix)singester|%(ssd_prefix)s-write|loki-single-binary)' % {pod_prefix: $._config.pod_prefix_matcher, ssd_prefix: $._config.ssd.pod_prefix_matcher})] + else [utils.selector.re('pod', '%s' % (if $._config.ssd.enabled then '%s-write.*' % $._config.ssd.pod_prefix_matcher else '(%(pod_prefix)singester.*|%(pod_prefix)spartition-ingester.*)' % {pod_prefix: $._config.pod_prefix_matcher} ))], querier: if $._config.meta_monitoring.enabled then [utils.selector.re('pod', '(%squerier|%s-read|loki-single-binary)' % [$._config.pod_prefix_matcher, $._config.ssd.pod_prefix_matcher])] else [utils.selector.re('pod', '%s' % (if $._config.ssd.enabled then '%s-read.*' % $._config.ssd.pod_prefix_matcher else '%squerier.*' % $._config.pod_prefix_matcher))], diff --git a/production/loki-mixin/dashboards/loki-reads-resources.libsonnet b/production/loki-mixin/dashboards/loki-reads-resources.libsonnet index 1b223fb9b3a38..c4b7c1f88337e 100644 --- a/production/loki-mixin/dashboards/loki-reads-resources.libsonnet +++ b/production/loki-mixin/dashboards/loki-reads-resources.libsonnet @@ -7,7 +7,7 @@ else 'index-gateway', local ingester_pod_matcher = if $._config.meta_monitoring.enabled - then 'container=~"loki|ingester|partition-ingester", pod=~"(%singester.*|partition-ingester.*|loki-single-binary)"' % $._config.pod_prefix_matcher + then 'container=~"loki|ingester|partition-ingester", pod=~"(%(prefix)singester.*|%(prefix)spartition-ingester.*|loki-single-binary)"' % {prefix: $._config.pod_prefix_matcher} else 'container=~"ingester|partition-ingester"', local ingester_job_matcher = if $._config.meta_monitoring.enabled then '(ingester.*|partition-ingester.*|loki-single-binary)' diff --git a/production/loki-mixin/dashboards/loki-writes-resources.libsonnet b/production/loki-mixin/dashboards/loki-writes-resources.libsonnet index af385396ef0da..57e09e1121f28 100644 --- a/production/loki-mixin/dashboards/loki-writes-resources.libsonnet +++ b/production/loki-mixin/dashboards/loki-writes-resources.libsonnet @@ -1,6 +1,6 @@ (import 'dashboard-utils.libsonnet') { local ingester_pod_matcher = if $._config.meta_monitoring.enabled - then 'container=~"loki|ingester|partition-ingester", pod=~"(%singester.*|partition-ingester.*|loki-single-binary)"' % $._config.pod_prefix_matcher + then 'container=~"loki|ingester|partition-ingester", pod=~"(%(prefix)singester.*|%(prefix)spartition-ingester.*|loki-single-binary)"' % {prefix: $._config.pod_prefix_matcher} else 'container=~"ingester|partition-ingester"', local ingester_job_matcher = if $._config.meta_monitoring.enabled then '(ingester.*|partition-ingester.*|loki-single-binary)'