Skip to content

Commit

Permalink
Fix ineffective alert rule for low space (#10807)
Browse files Browse the repository at this point in the history
* fix ineffective rule for low space

Signed-off-by: tabokie <xy.tao@outlook.com>

* minor fix

Signed-off-by: tabokie <xy.tao@outlook.com>
  • Loading branch information
tabokie committed Aug 25, 2021
1 parent 7625317 commit 3b098f6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions metrics/alertmanager/tikv.rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -301,17 +301,17 @@ groups:
value: '{{ $value }}'
summary: TiKV pending task too much

- alert: TiKV_low_space_and_add_region
expr: count( (sum(tikv_store_size_bytes{type="available"}) by (instance) / sum(tikv_store_size_bytes{type="capacity"}) by (instance) < 0.2) and (sum(tikv_raftstore_snapshot_traffic_total{type="applying"}) by (instance) > 0 ) ) > 0
- alert: TiKV_low_space
expr: sum(tikv_store_size_bytes{type="available"}) by (instance) / sum(tikv_store_size_bytes{type="capacity"}) by (instance) < 0.2
for: 1m
labels:
env: ENV_LABELS_ENV
level: warning
expr: count( (sum(tikv_store_size_bytes{type="available"}) by (instance) / sum(tikv_store_size_bytes{type="capacity"}) by (instance) < 0.2) and (sum(tikv_raftstore_snapshot_traffic_total{type="applying"}) by (instance) > 0 ) ) > 0
expr: sum(tikv_store_size_bytes{type="available"}) by (instance) / sum(tikv_store_size_bytes{type="capacity"}) by (instance) < 0.2
annotations:
description: 'cluster: ENV_LABELS_ENV, type: {{ $labels.type }}, instance: {{ $labels.instance }}, values: {{ $value }}'
value: '{{ $value }}'
summary: TiKV low_space and add_region
summary: TiKV available disk space too low

- alert: TiKV_approximate_region_size
expr: histogram_quantile(0.99, sum(rate(tikv_raftstore_region_size_bucket[1m])) by (le)) > 1073741824
Expand Down

0 comments on commit 3b098f6

Please sign in to comment.