Skip to content

Commit 181f725

Browse files
committed
use multiline wrapper for the rest of annotation.message templates
1 parent 929623f commit 181f725

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

cortex-mixin/alerts/alerts.libsonnet

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,9 @@
201201
severity: 'warning',
202202
},
203203
annotations: {
204-
message: '{{ $labels.job }}/{{ $labels.instance }} has restarted {{ printf "%.2f" $value }} times in the last 30 mins.',
204+
message: |||
205+
{{ $labels.job }}/{{ $labels.instance }} has restarted {{ printf "%.2f" $value }} times in the last 30 mins.
206+
|||,
205207
},
206208
},
207209
{
@@ -214,7 +216,9 @@
214216
severity: 'critical',
215217
},
216218
annotations: {
217-
message: '{{ $labels.job }}/{{ $labels.instance }} transfer failed.',
219+
message: |||
220+
{{ $labels.job }}/{{ $labels.instance }} transfer failed.
221+
|||,
218222
},
219223
},
220224
{
@@ -268,7 +272,9 @@
268272
severity: 'critical',
269273
},
270274
annotations: {
271-
message: '{{ $labels.job }}/{{ $labels.instance }} has a number of mmap-ed areas close to the limit.',
275+
message: |||
276+
{{ $labels.job }}/{{ $labels.instance }} has a number of mmap-ed areas close to the limit.
277+
|||,
272278
},
273279
},
274280
],
@@ -690,7 +696,9 @@
690696
severity: 'warning',
691697
},
692698
annotations: {
693-
message: 'Cortex instance {{ $labels.instance }} in %(alert_aggregation_variables)s sees incorrect number of gossip members.' % $._config,
699+
message: |||
700+
Cortex instance {{ $labels.instance }} in %(alert_aggregation_variables)s sees incorrect number of gossip members.
701+
||| % $._config,
694702
},
695703
},
696704
],

0 commit comments

Comments
 (0)