From 7e839b293b0116b91df8a6c21c767f9ed456bedc Mon Sep 17 00:00:00 2001 From: Sebastian Gaiser Date: Mon, 9 Dec 2024 15:29:30 +0000 Subject: [PATCH] fix(alerts): use sum by instance max for 'KubeAggregatedAPIErrors' - adjust description Signed-off-by: Sebastian Gaiser --- alerts/kube_apiserver.libsonnet | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/alerts/kube_apiserver.libsonnet b/alerts/kube_apiserver.libsonnet index 65497b607..e7348d488 100644 --- a/alerts/kube_apiserver.libsonnet +++ b/alerts/kube_apiserver.libsonnet @@ -95,7 +95,9 @@ local utils = import '../lib/utils.libsonnet'; severity: 'warning', }, annotations: { - description: 'Kubernetes aggregated API {{ $labels.name }}/{{ $labels.namespace }} has reported errors. It has appeared unavailable {{ $value | humanize }} times averaged over the past 10m.', + description: 'Kubernetes aggregated API {{ $labels.instance }}/{{ $labels.name }} has reported {{ $labels.reason }} errors%s.' % [ + (utils.ifShowMultiCluster($._config, ' on cluster {{ $labels.%(clusterLabel)s }}' % $._config), + ], summary: 'Kubernetes aggregated API has reported errors.', }, },