Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions cortex-mixin/alerts/compactor.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@
{
// Alert if the compactor has not successfully cleaned up blocks in the last 24h.
alert: 'CortexCompactorHasNotSuccessfullyCleanedUpBlocks',
'for': '15m',
'for': '1h',
expr: |||
(time() - cortex_compactor_block_cleanup_last_successful_run_timestamp_seconds > 60 * 60 * 24)
and
(cortex_compactor_block_cleanup_last_successful_run_timestamp_seconds > 0)
|||,
labels: {
severity: 'critical',
Expand All @@ -20,17 +18,17 @@
},
},
{
// Alert if the compactor has not successfully cleaned up blocks since its start.
alert: 'CortexCompactorHasNotSuccessfullyCleanedUpBlocksSinceStart',
'for': '24h',
// Alert if the compactor has not successfully run compaction in the last 6h.
alert: 'CortexCompactorHasNotSuccessfullyRunCompaction',
'for': '1h',
expr: |||
cortex_compactor_block_cleanup_last_successful_run_timestamp_seconds == 0
time() - cortex_compactor_last_successful_run_timestamp_seconds > 60 * 60 * 6
|||,
labels: {
severity: 'critical',
},
annotations: {
message: 'Cortex Compactor {{ $labels.namespace }}/{{ $labels.instance }} has not successfully cleaned up blocks in the last 24 hours.',
message: 'Cortex Compactor {{ $labels.namespace }}/{{ $labels.instance }} has not run compaction in the last 6 hours.',
},
},
{
Expand Down