-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from qonto/add-80-percent-disk-space-warning
feat(RDS): create RDSLowDiskSpaceCount to display instances with less than 80% disk space
- Loading branch information
Showing
3 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
charts/prometheus-rds-alerts/prometheus_tests/RDSLowDiskSpaceCount.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
rule_files: | ||
- rules.yml | ||
|
||
evaluation_interval: 1m | ||
|
||
tests: | ||
|
||
- name: RDSLowDiskSpaceCount | ||
interval: 1m | ||
input_series: | ||
- series: 'rds_free_storage_bytes{aws_account_id="111111111111",aws_region="eu-west-3",dbidentifier="db1"}' | ||
values: '3221225472x10' # 3GB | ||
- series: 'rds_allocated_storage_bytes{aws_account_id="111111111111",aws_region="eu-west-3",dbidentifier="db1"}' | ||
values: '21474836480x15' # 20GB | ||
alert_rule_test: | ||
- alertname: RDSLowDiskSpaceCount | ||
eval_time: 15m | ||
exp_alerts: | ||
- exp_labels: | ||
aws_account_id: 111111111111 | ||
aws_region: eu-west-3 | ||
severity: warning | ||
exp_annotations: | ||
description: "One or more RDS instances has <20% free disk space" | ||
summary: "Less than 20% free disk space on at least one instance" | ||
runbook_url: "https://qonto.github.io/database-monitoring-framework/0.0.0/runbooks/rds/RDSLowDiskSpaceCount" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
title: Free disk space is under 20 percent for at least one instance | ||
--- | ||
|
||
# RDSLowDiskSpaceCount | ||
|
||
## Meaning | ||
|
||
Alert is triggered when at least one RDS instance is under the threshold on storage left. | ||
|
||
## Impact | ||
|
||
The PostgreSQL instance(s) might stop to prevent data corruption if no more disk space is available. | ||
|
||
## Diagnosis | ||
|
||
1. Find affected instance list in prometheus with: | ||
|
||
```promql | ||
max by (aws_account_id, aws_region, dbidentifier) (rds_free_storage_bytes{} * 100 / rds_allocated_storage_bytes{}) < 20 | ||
``` | ||
|
||
1. Refer to [RDSDiskSpaceLimit](RDSDiskSpaceLimit.md) for each of them as it's the same alert just ringing a bit earlier. |