From 123f23cb8380da3d0f7a947d04f4289a9ca26638 Mon Sep 17 00:00:00 2001 From: Paulin Todev Date: Tue, 23 Apr 2024 15:32:17 +0100 Subject: [PATCH] Sum in alerts by cluster and namespace (#6875) --- operations/agent-flow-mixin/alerts/opentelemetry.libsonnet | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/operations/agent-flow-mixin/alerts/opentelemetry.libsonnet b/operations/agent-flow-mixin/alerts/opentelemetry.libsonnet index 7863d44cdf22..cb16033a0a4c 100644 --- a/operations/agent-flow-mixin/alerts/opentelemetry.libsonnet +++ b/operations/agent-flow-mixin/alerts/opentelemetry.libsonnet @@ -8,7 +8,7 @@ alert.newGroup( // imposed by otelcol.processor.memory_limiter. alert.newRule( 'OtelcolReceiverRefusedSpans', - 'sum(rate(receiver_refused_spans_ratio_total{}[1m])) > 0', + 'sum by (cluster, namespace) (rate(receiver_refused_spans_ratio_total{}[1m])) > 0', 'The receiver could not push some spans to the pipeline.', '5m', ), @@ -17,7 +17,7 @@ alert.newGroup( // There could be an issue with the payload or with the destination endpoint. alert.newRule( 'OtelcolExporterFailedSpans', - 'sum(rate(exporter_send_failed_spans_ratio_total{}[1m])) > 0', + 'sum by (cluster, namespace) (rate(exporter_send_failed_spans_ratio_total{}[1m])) > 0', 'The exporter failed to send spans to their destination.', '5m', ),