|
4 | 4 | name: 'cortex_compactor_alerts',
|
5 | 5 | rules: [
|
6 | 6 | {
|
7 |
| - // Alert if the compactor has not successfully completed a run in the last 24h. |
8 |
| - alert: 'CortexCompactorHasNotSuccessfullyRun', |
| 7 | + // Alert if the compactor has not successfully cleaned up blocks in the last 24h. |
| 8 | + alert: 'CortexCompactorHasNotSuccessfullyCleanedUpBlocks', |
9 | 9 | 'for': '15m',
|
10 | 10 | expr: |||
|
11 |
| - (time() - cortex_compactor_last_successful_run_timestamp_seconds{%s} > 60 * 60 * 24) |
| 11 | + (time() - cortex_compactor_block_cleanup_last_successful_run_timestamp_seconds{%s} > 60 * 60 * 24) |
12 | 12 | and
|
13 |
| - (cortex_compactor_last_successful_run_timestamp_seconds{%s} > 0) |
| 13 | + (cortex_compactor_block_cleanup_last_successful_run_timestamp_seconds{%s} > 0) |
14 | 14 | ||| % [$.namespace_matcher(''), $.namespace_matcher('')],
|
15 | 15 | labels: {
|
16 | 16 | severity: 'critical',
|
17 | 17 | },
|
18 | 18 | annotations: {
|
19 |
| - message: 'Cortex Compactor {{ $labels.namespace }}/{{ $labels.instance }} has not successfully completed a run in the last 24 hours.', |
| 19 | + message: 'Cortex Compactor {{ $labels.namespace }}/{{ $labels.instance }} has not successfully cleaned up blocks in the last 24 hours.', |
20 | 20 | },
|
21 | 21 | },
|
22 | 22 | {
|
23 |
| - // Alert if the compactor has not successfully completed a run since its start. |
24 |
| - alert: 'CortexCompactorHasNotSuccessfullyRunSinceStart', |
| 23 | + // Alert if the compactor has not successfully cleaned up blocks since its start. |
| 24 | + alert: 'CortexCompactorHasNotSuccessfullyCleanedUpBlocksSinceStart', |
25 | 25 | 'for': '24h',
|
26 | 26 | expr: |||
|
27 |
| - cortex_compactor_last_successful_run_timestamp_seconds{%s} == 0 |
| 27 | + cortex_compactor_block_cleanup_last_successful_run_timestamp_seconds{%s} == 0 |
28 | 28 | ||| % $.namespace_matcher(''),
|
29 | 29 | labels: {
|
30 | 30 | severity: 'critical',
|
31 | 31 | },
|
32 | 32 | annotations: {
|
33 |
| - message: 'Cortex Compactor {{ $labels.namespace }}/{{ $labels.instance }} has not successfully completed a run in the last 24 hours.', |
| 33 | + message: 'Cortex Compactor {{ $labels.namespace }}/{{ $labels.instance }} has not successfully cleaned up blocks in the last 24 hours.', |
34 | 34 | },
|
35 | 35 | },
|
36 | 36 | {
|
|
0 commit comments