-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CRIMAPP-1448 Prometheus rules for RDS in Crime Apply staging
- Loading branch information
1 parent
49c867d
commit 0c8e152
Showing
1 changed file
with
68 additions
and
0 deletions.
There are no files selected for viewing
68 changes: 68 additions & 0 deletions
68
...rm.service.justice.gov.uk/laa-apply-for-criminal-legal-aid-staging/06-prometheus-rds.yaml
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,68 @@ | ||
# Prometheus Alerts | ||
# | ||
# https://user-guide.cloud-platform.service.justice.gov.uk/documentation/monitoring-an-app/how-to-create-alarms.html | ||
# | ||
# Note: we are using a regex in the namespace to filter and trigger alerts | ||
# in both, staging and production environments. | ||
# | ||
# To see the current alerts in this namespace: | ||
# kubectl describe prometheusrule -n laa-apply-for-criminal-legal-aid-staging | ||
# | ||
# Alerts will be sent to the slack channel: #laa-crime-apply-alerts | ||
# | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: PrometheusRule | ||
metadata: | ||
name: prometheus-rules-rds | ||
namespace: laa-apply-for-criminal-legal-aid-staging | ||
labels: | ||
role: alert-rules | ||
prometheus: cloud-platform | ||
spec: | ||
groups: | ||
- name: rds-rules | ||
rules: | ||
- alert: CrimeApply-Staging-RDS-HighCPUUtilization | ||
expr: aws_rds_cpuutilization_average{dbinstance_identifier="cloud-platform-f3b7a38b29b21644"} > 25 | ||
for: 1m | ||
labels: | ||
severity: laa-crime-apply-alerts | ||
annotations: | ||
message: Crime Apply staging - RDS CPU usage > 25%. | ||
dashboard_url: https://grafana.live.cloud-platform.service.justice.gov.uk/d/VR46pmwWk/aws-rds?orgId=1&var-datasource=P896B4444D3F0DAB8&var-region=default&var-dbinstanceidentifier=cloud-platform-f3b7a38b29b21644 | ||
|
||
- alert: CrimeApply-Staging-RDS-LowStorage | ||
expr: aws_rds_free_storage_space_average{dbinstance_identifier="cloud-platform-f3b7a38b29b21644"} < 1024*1024*1024 | ||
for: 1m | ||
labels: | ||
severity: laa-crime-apply-alerts | ||
annotations: | ||
message: Crime Apply staging - RDS storage capacity < 1GB. | ||
dashboard_url: https://grafana.live.cloud-platform.service.justice.gov.uk/d/VR46pmwWk/aws-rds?orgId=1&var-datasource=P896B4444D3F0DAB8&var-region=default&var-dbinstanceidentifier=cloud-platform-f3b7a38b29b21644 | ||
|
||
- alert: CrimeApply-Staging-RDS-HighReadLatency | ||
expr: aws_rds_read_latency_average{dbinstance_identifier="cloud-platform-f3b7a38b29b21644"} > 0.5 | ||
for: 1m | ||
labels: | ||
severity: laa-crime-apply-alerts | ||
annotations: | ||
message: Crime Apply staging - RDS read latency > 500ms. | ||
dashboard_url: https://grafana.live.cloud-platform.service.justice.gov.uk/d/VR46pmwWk/aws-rds?orgId=1&var-datasource=P896B4444D3F0DAB8&var-region=default&var-dbinstanceidentifier=cloud-platform-f3b7a38b29b21644 | ||
|
||
- alert: CrimeApply-Staging-RDS-HighWriteLatency | ||
expr: aws_rds_write_latency_average{dbinstance_identifier="cloud-platform-f3b7a38b29b21644"} > 0.5 | ||
for: 1m | ||
labels: | ||
severity: laa-crime-apply-alerts | ||
annotations: | ||
message: Crime Apply staging - RDS write latency > 500ms. | ||
dashboard_url: https://grafana.live.cloud-platform.service.justice.gov.uk/d/VR46pmwWk/aws-rds?orgId=1&var-datasource=P896B4444D3F0DAB8&var-region=default&var-dbinstanceidentifier=cloud-platform-f3b7a38b29b21644 | ||
|
||
- alert: CrimeApply-Staging-RDS-HighDatabaseConnections | ||
expr: aws_rds_database_connections_average{dbinstance_identifier="cloud-platform-f3b7a38b29b21644"} > 20 | ||
for: 1m | ||
labels: | ||
severity: laa-crime-apply-alerts | ||
annotations: | ||
message: Crime Apply staging - RDS number of database connections > 20. | ||
dashboard_url: https://grafana.live.cloud-platform.service.justice.gov.uk/d/VR46pmwWk/aws-rds?orgId=1&var-datasource=P896B4444D3F0DAB8&var-region=default&var-dbinstanceidentifier=cloud-platform-f3b7a38b29b21644 |