Skip to content

Commit

Permalink
Fix MimirCompactorHasNotUploadedBlocks alert false positive when Mimi…
Browse files Browse the repository at this point in the history
…r is deployed in monolithic mode (#1902)

Signed-off-by: Marco Pracucci <marco@pracucci.com>
  • Loading branch information
pracucci authored May 23, 2022
1 parent 12929ad commit 48cae31
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* [BUGFIX] Fix `container_memory_usage_bytes:sum` recording rule #1865
* [BUGFIX] Fix `MimirGossipMembersMismatch` alerts if Mimir alertmanager is activated #1870
* [BUGFIX] Fix `MimirRulerMissedEvaluations` to show % of missed alerts as a value between 0 and 100 instead of 0 and 1. #1895
* [BUGFIX] Fix `MimirCompactorHasNotUploadedBlocks` alert false positive when Mimir is deployed in monolithic mode. #1901
* [BUGFIX] Do not trigger `MimirAllocatingTooMuchMemory` alerts if no container limits are supplied. #1905

## 2.1.0-rc.0
Expand Down
8 changes: 4 additions & 4 deletions operations/mimir-mixin-compiled/alerts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -680,9 +680,9 @@ groups:
message: Mimir Compactor {{ $labels.pod }} in {{ $labels.cluster }}/{{ $labels.namespace
}} has not uploaded any block in the last 24 hours.
expr: |
(time() - thanos_objstore_bucket_last_successful_upload_time{job=~".+/(compactor.*|cortex|mimir)"} > 60 * 60 * 24)
(time() - thanos_objstore_bucket_last_successful_upload_time{component="compactor"} > 60 * 60 * 24)
and
(thanos_objstore_bucket_last_successful_upload_time{job=~".+/(compactor.*|cortex|mimir)"} > 0)
(thanos_objstore_bucket_last_successful_upload_time{component="compactor"} > 0)
for: 15m
labels:
severity: critical
Expand All @@ -691,7 +691,7 @@ groups:
message: Mimir Compactor {{ $labels.pod }} in {{ $labels.cluster }}/{{ $labels.namespace
}} has not uploaded any block in the last 24 hours.
expr: |
thanos_objstore_bucket_last_successful_upload_time{job=~".+/(compactor.*|cortex|mimir)"} == 0
thanos_objstore_bucket_last_successful_upload_time{component="compactor"} == 0
for: 24h
labels:
severity: critical
Expand All @@ -700,7 +700,7 @@ groups:
message: Mimir Compactor {{ $labels.pod }} in {{ $labels.cluster }}/{{ $labels.namespace
}} has found and ignored blocks with out of order chunks.
expr: |
increase(cortex_compactor_blocks_marked_for_no_compaction_total{job=~".+/(compactor.*|cortex|mimir)", reason="block-index-out-of-order-chunk"}[5m]) > 0
increase(cortex_compactor_blocks_marked_for_no_compaction_total{component="compactor", reason="block-index-out-of-order-chunk"}[5m]) > 0
for: 1m
labels:
severity: warning
Expand Down
14 changes: 7 additions & 7 deletions operations/mimir-mixin/alerts/compactor.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@
alert: $.alertName('CompactorHasNotUploadedBlocks'),
'for': '15m',
expr: |||
(time() - thanos_objstore_bucket_last_successful_upload_time{job=~".+/(%(compactor)s)"} > 60 * 60 * 24)
(time() - thanos_objstore_bucket_last_successful_upload_time{component="compactor"} > 60 * 60 * 24)
and
(thanos_objstore_bucket_last_successful_upload_time{job=~".+/(%(compactor)s)"} > 0)
||| % $._config.job_names,
(thanos_objstore_bucket_last_successful_upload_time{component="compactor"} > 0)
|||,
labels: {
severity: 'critical',
},
Expand All @@ -81,8 +81,8 @@
alert: $.alertName('CompactorHasNotUploadedBlocks'),
'for': '24h',
expr: |||
thanos_objstore_bucket_last_successful_upload_time{job=~".+/(%(compactor)s)"} == 0
||| % $._config.job_names,
thanos_objstore_bucket_last_successful_upload_time{component="compactor"} == 0
|||,
labels: {
severity: 'critical',
},
Expand All @@ -95,8 +95,8 @@
alert: $.alertName('CompactorSkippedBlocksWithOutOfOrderChunks'),
'for': '1m',
expr: |||
increase(cortex_compactor_blocks_marked_for_no_compaction_total{job=~".+/(%(compactor)s)", reason="block-index-out-of-order-chunk"}[5m]) > 0
||| % $._config.job_names,
increase(cortex_compactor_blocks_marked_for_no_compaction_total{component="compactor", reason="block-index-out-of-order-chunk"}[5m]) > 0
|||,
labels: {
severity: 'warning',
},
Expand Down

0 comments on commit 48cae31

Please sign in to comment.