lorenzoaiello / terraform-aws-rds-alarms

This Terraform module manages Cloudwatch Alarms for an RDS instance.
https://registry.terraform.io/modules/lorenzoaiello/rds-alarms/aws
MIT License
37 stars 36 forks source link

support a metric for used storage space to handle autoscaling better #18

Open mmerickel opened 2 years ago

mmerickel commented 2 years ago

When using RDS autoscaling of storage you can set a min and max allocation. Setting "disk_free_storage_space_too_low_threshold" is hard because it depends on the currently allocated space which is dynamic.

I really want a metric to tell me when I'm approaching the max storage allocation to know when AWS won't save me anymore. If you enable enhanced monitoring you can use the fileSys.used metric to trigger on this and it'd be nice if it were an option to enable.

Maybe some new options could be added around this conditional on a bool to know whether enhanced monitoring is enabled.

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring-Available-OS-Metrics.html

lorenzoaiello commented 9 months ago

Hey @mmerickel ,

I created a [PR|https://github.com/lorenzoaiello/terraform-aws-rds-alarms/pull/25] that proposes the changes you suggested. Can you take a look and let me know if that's what you had in mind?

mmerickel commented 9 months ago

I haven't had time to try this but it looks like it would do what I had requested.