Skip to content

Commit d6bdd88

Browse files
committed
add in compactor|blocks.libsonnet as well
1 parent 8ad55b9 commit d6bdd88

File tree

2 files changed

+63
-21
lines changed

2 files changed

+63
-21
lines changed

cortex-mixin/alerts/blocks.libsonnet

Lines changed: 45 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626
severity: 'critical',
2727
},
2828
annotations: {
29-
message: 'Cortex Ingester {{ $labels.instance }} in %(alert_aggregation_variables)s has not shipped any block in the last 4 hours.' % $._config,
29+
message: |||
30+
Cortex Ingester {{ $labels.instance }} in %(alert_aggregation_variables)s has not shipped any block in the last 4 hours.
31+
||| % $._config,
3032
},
3133
},
3234
{
@@ -43,7 +45,9 @@
4345
severity: 'critical',
4446
},
4547
annotations: {
46-
message: 'Cortex Ingester {{ $labels.instance }} in %(alert_aggregation_variables)s has not shipped any block in the last 4 hours.' % $._config,
48+
message: |||
49+
Cortex Ingester {{ $labels.instance }} in %(alert_aggregation_variables)s has not shipped any block in the last 4 hours.
50+
||| % $._config,
4751
},
4852
},
4953
{
@@ -61,7 +65,9 @@
6165
severity: 'critical',
6266
},
6367
annotations: {
64-
message: "Cortex Ingester {{ $labels.instance }} in %(alert_aggregation_variables)s has compacted a block {{ $value | humanizeDuration }} ago but it hasn't been successfully uploaded to the storage yet." % $._config,
68+
message: |||
69+
Cortex Ingester {{ $labels.instance }} in %(alert_aggregation_variables)s has compacted a block {{ $value | humanizeDuration }} ago but it hasn't been successfully uploaded to the storage yet.
70+
||| % $._config,
6571
},
6672
},
6773
{
@@ -77,7 +83,9 @@
7783
severity: 'critical',
7884
},
7985
annotations: {
80-
message: 'Cortex Ingester {{ $labels.instance }} in %(alert_aggregation_variables)s is failing to compact TSDB head.' % $._config,
86+
message: |||
87+
Cortex Ingester {{ $labels.instance }} in %(alert_aggregation_variables)s is failing to compact TSDB head.
88+
||| % $._config,
8189
},
8290
},
8391
{
@@ -89,7 +97,9 @@
8997
severity: 'critical',
9098
},
9199
annotations: {
92-
message: 'Cortex Ingester {{ $labels.instance }} in %(alert_aggregation_variables)s is failing to truncate TSDB head.' % $._config,
100+
message: |||
101+
Cortex Ingester {{ $labels.instance }} in %(alert_aggregation_variables)s is failing to truncate TSDB head.
102+
||| % $._config,
93103
},
94104
},
95105
{
@@ -101,7 +111,9 @@
101111
severity: 'critical',
102112
},
103113
annotations: {
104-
message: 'Cortex Ingester {{ $labels.instance }} in %(alert_aggregation_variables)s is failing to create TSDB checkpoint.' % $._config,
114+
message: |||
115+
Cortex Ingester {{ $labels.instance }} in %(alert_aggregation_variables)s is failing to create TSDB checkpoint.
116+
||| % $._config,
105117
},
106118
},
107119
{
@@ -113,7 +125,9 @@
113125
severity: 'critical',
114126
},
115127
annotations: {
116-
message: 'Cortex Ingester {{ $labels.instance }} in %(alert_aggregation_variables)s is failing to delete TSDB checkpoint.' % $._config,
128+
message: |||
129+
Cortex Ingester {{ $labels.instance }} in %(alert_aggregation_variables)s is failing to delete TSDB checkpoint.
130+
||| % $._config,
117131
},
118132
},
119133
{
@@ -125,7 +139,9 @@
125139
severity: 'warning',
126140
},
127141
annotations: {
128-
message: 'Cortex Ingester {{ $labels.instance }} in %(alert_aggregation_variables)s is failing to truncate TSDB WAL.' % $._config,
142+
message: |||
143+
Cortex Ingester {{ $labels.instance }} in %(alert_aggregation_variables)s is failing to truncate TSDB WAL.
144+
||| % $._config,
129145
},
130146
},
131147
{
@@ -137,7 +153,9 @@
137153
severity: 'critical',
138154
},
139155
annotations: {
140-
message: 'Cortex Ingester {{ $labels.instance }} in %(alert_aggregation_variables)s got a corrupted TSDB WAL.' % $._config,
156+
message: |||
157+
Cortex Ingester {{ $labels.instance }} in %(alert_aggregation_variables)s got a corrupted TSDB WAL.
158+
||| % $._config,
141159
},
142160
},
143161
{
@@ -150,7 +168,9 @@
150168
severity: 'critical',
151169
},
152170
annotations: {
153-
message: 'Cortex Ingester {{ $labels.instance }} in %(alert_aggregation_variables)s is failing to write to TSDB WAL.' % $._config,
171+
message: |||
172+
Cortex Ingester {{ $labels.instance }} in %(alert_aggregation_variables)s is failing to write to TSDB WAL.
173+
||| % $._config,
154174
},
155175
},
156176
{
@@ -166,7 +186,9 @@
166186
severity: 'critical',
167187
},
168188
annotations: {
169-
message: 'Cortex Querier {{ $labels.instance }} in %(alert_aggregation_variables)s has not successfully scanned the bucket since {{ $value | humanizeDuration }}.' % $._config,
189+
message: |||
190+
Cortex Querier {{ $labels.instance }} in %(alert_aggregation_variables)s has not successfully scanned the bucket since {{ $value | humanizeDuration }}.
191+
||| % $._config,
170192
},
171193
},
172194
{
@@ -190,7 +212,9 @@
190212
severity: 'warning',
191213
},
192214
annotations: {
193-
message: 'Cortex Queries in %(alert_aggregation_variables)s are refetching series from different store-gateways (because of missing blocks) for the {{ printf "%%.0f" $value }}%% of queries.' % $._config,
215+
message: |||
216+
Cortex Queries in %(alert_aggregation_variables)s are refetching series from different store-gateways (because of missing blocks) for the {{ printf "%%.0f" $value }}%% of queries.
217+
||| % $._config,
194218
},
195219
},
196220
{
@@ -206,7 +230,9 @@
206230
severity: 'critical',
207231
},
208232
annotations: {
209-
message: 'Cortex Store Gateway {{ $labels.instance }} in %(alert_aggregation_variables)s has not successfully synched the bucket since {{ $value | humanizeDuration }}.' % $._config,
233+
message: |||
234+
Cortex Store Gateway {{ $labels.instance }} in %(alert_aggregation_variables)s has not successfully synched the bucket since {{ $value | humanizeDuration }}.
235+
||| % $._config,
210236
},
211237
},
212238
{
@@ -219,7 +245,9 @@
219245
severity: 'critical',
220246
},
221247
annotations: {
222-
message: 'Cortex bucket index for tenant {{ $labels.user }} in %(alert_aggregation_variables)s has not been updated since {{ $value | humanizeDuration }}.' % $._config,
248+
message: |||
249+
Cortex bucket index for tenant {{ $labels.user }} in %(alert_aggregation_variables)s has not been updated since {{ $value | humanizeDuration }}.
250+
||| % $._config,
223251
},
224252
},
225253
{
@@ -233,7 +261,9 @@
233261
severity: 'warning',
234262
},
235263
annotations: {
236-
message: 'Cortex tenant {{ $labels.user }} in %(alert_aggregation_variables)s has {{ $value }} partial blocks.' % $._config,
264+
message: |||
265+
Cortex tenant {{ $labels.user }} in %(alert_aggregation_variables)s has {{ $value }} partial blocks.
266+
||| % $._config,
237267
},
238268
},
239269
],

cortex-mixin/alerts/compactor.libsonnet

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
severity: 'critical',
1515
},
1616
annotations: {
17-
message: 'Cortex Compactor {{ $labels.instance }} in %(alert_aggregation_variables)s has not successfully cleaned up blocks in the last 6 hours.' % $._config,
17+
message: |||
18+
Cortex Compactor {{ $labels.instance }} in %(alert_aggregation_variables)s has not successfully cleaned up blocks in the last 6 hours.
19+
||| % $._config,
1820
},
1921
},
2022
{
@@ -30,7 +32,9 @@
3032
severity: 'critical',
3133
},
3234
annotations: {
33-
message: 'Cortex Compactor {{ $labels.instance }} in %(alert_aggregation_variables)s has not run compaction in the last 24 hours.' % $._config,
35+
message: |||
36+
Cortex Compactor {{ $labels.instance }} in %(alert_aggregation_variables)s has not run compaction in the last 24 hours.
37+
||| % $._config,
3438
},
3539
},
3640
{
@@ -44,7 +48,9 @@
4448
severity: 'critical',
4549
},
4650
annotations: {
47-
message: 'Cortex Compactor {{ $labels.instance }} in %(alert_aggregation_variables)s has not run compaction in the last 24 hours.' % $._config,
51+
message: |||
52+
Cortex Compactor {{ $labels.instance }} in %(alert_aggregation_variables)s has not run compaction in the last 24 hours.
53+
||| % $._config,
4854
},
4955
},
5056
{
@@ -57,7 +63,9 @@
5763
severity: 'critical',
5864
},
5965
annotations: {
60-
message: 'Cortex Compactor {{ $labels.instance }} in %(alert_aggregation_variables)s failed to run 2 consecutive compactions.' % $._config,
66+
message: |||
67+
Cortex Compactor {{ $labels.instance }} in %(alert_aggregation_variables)s failed to run 2 consecutive compactions.
68+
||| % $._config,
6169
},
6270
},
6371
{
@@ -73,7 +81,9 @@
7381
severity: 'critical',
7482
},
7583
annotations: {
76-
message: 'Cortex Compactor {{ $labels.instance }} in %(alert_aggregation_variables)s has not uploaded any block in the last 24 hours.' % $._config,
84+
message: |||
85+
Cortex Compactor {{ $labels.instance }} in %(alert_aggregation_variables)s has not uploaded any block in the last 24 hours.
86+
||| % $._config,
7787
},
7888
},
7989
{
@@ -87,7 +97,9 @@
8797
severity: 'critical',
8898
},
8999
annotations: {
90-
message: 'Cortex Compactor {{ $labels.instance }} in %(alert_aggregation_variables)s has not uploaded any block in the last 24 hours.' % $._config,
100+
message: |||
101+
Cortex Compactor {{ $labels.instance }} in %(alert_aggregation_variables)s has not uploaded any block in the last 24 hours.
102+
||| % $._config,
91103
},
92104
},
93105
],

0 commit comments

Comments
 (0)