From 1e1785690a01cb792d2e44f560d063e62cde8685 Mon Sep 17 00:00:00 2001 From: Marco Pracucci Date: Wed, 12 Feb 2020 12:48:13 +0100 Subject: [PATCH] Fix queue in alerts annotation Signed-off-by: Marco Pracucci --- documentation/prometheus-mixin/alerts.libsonnet | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/prometheus-mixin/alerts.libsonnet b/documentation/prometheus-mixin/alerts.libsonnet index 4244172e5f..9c62cb58e5 100644 --- a/documentation/prometheus-mixin/alerts.libsonnet +++ b/documentation/prometheus-mixin/alerts.libsonnet @@ -187,7 +187,7 @@ }, annotations: { summary: 'Prometheus fails to send samples to remote storage.', - description: 'Prometheus %(prometheusName)s failed to send {{ printf "%%.1f" $value }}%% of the samples to queue {{$labels.queue}}.' % $._config, + description: 'Prometheus %(prometheusName)s failed to send {{ printf "%%.1f" $value }}%% of the samples to {{ if $labels.queue }}{{ $labels.queue }}{{ else }}{{ $labels.url }}{{ end }}.' % $._config, }, }, { @@ -208,7 +208,7 @@ }, annotations: { summary: 'Prometheus remote write is behind.', - description: 'Prometheus %(prometheusName)s remote write is {{ printf "%%.1f" $value }}s behind for queue {{$labels.queue}}.' % $._config, + description: 'Prometheus %(prometheusName)s remote write is {{ printf "%%.1f" $value }}s behind for {{ if $labels.queue }}{{ $labels.queue }}{{ else }}{{ $labels.url }}{{ end }}.' % $._config, }, }, {