From 2704d9a8265d8dcf37fe95bff78971d1b8659859 Mon Sep 17 00:00:00 2001 From: Paulin Todev Date: Tue, 23 Apr 2024 15:24:55 +0100 Subject: [PATCH] Sum in alerts by cluster and namespace --- 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', ),