Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit 131bb26

Browse files
committed
Simplify compactor alerts
We should simply alert on things not having run since X. Signed-off-by: Goutham Veeramachaneni <[email protected]>
1 parent feff96e commit 131bb26

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

cortex-mixin/alerts/compactor.libsonnet

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@
66
{
77
// Alert if the compactor has not successfully cleaned up blocks in the last 24h.
88
alert: 'CortexCompactorHasNotSuccessfullyCleanedUpBlocks',
9-
'for': '15m',
9+
'for': '1h',
1010
expr: |||
1111
(time() - cortex_compactor_block_cleanup_last_successful_run_timestamp_seconds > 60 * 60 * 24)
12-
and
13-
(cortex_compactor_block_cleanup_last_successful_run_timestamp_seconds > 0)
1412
|||,
1513
labels: {
1614
severity: 'critical',
@@ -20,17 +18,17 @@
2018
},
2119
},
2220
{
23-
// Alert if the compactor has not successfully cleaned up blocks since its start.
24-
alert: 'CortexCompactorHasNotSuccessfullyCleanedUpBlocksSinceStart',
25-
'for': '24h',
21+
// Alert if the compactor has not successfully run compaction in the last 6h.
22+
alert: 'CortexCompactorHasNotSuccessfullyRunCompaction',
23+
'for': '1h',
2624
expr: |||
27-
cortex_compactor_block_cleanup_last_successful_run_timestamp_seconds == 0
25+
time() - cortex_compactor_block_cleanup_last_successful_run_timestamp_seconds > 60 * 60 * 6
2826
|||,
2927
labels: {
3028
severity: 'critical',
3129
},
3230
annotations: {
33-
message: 'Cortex Compactor {{ $labels.namespace }}/{{ $labels.instance }} has not successfully cleaned up blocks in the last 24 hours.',
31+
message: 'Cortex Compactor {{ $labels.namespace }}/{{ $labels.instance }} has not run compaction in the last 6 hours.',
3432
},
3533
},
3634
{

0 commit comments

Comments
 (0)