How to Clean Up AWS CloudWatch Alarms
When deleting EC2 instances, CloudWatch alarms are sometimes left behind.
cleanup_aws_alarms plugin can find and delete these orphaned alarms.
> config edit resoto.worker
Enable cleanup by modifying the
resotoworkersection of the configuration as follows:
# Enable cleanup of resources
# Do not actually cleanup resources, just create log messages
# How many cleanup threads to run in parallel
When cleanup is enabled, marked resources will be deleted as a part of the
collect_and_cleanupworkflow, which runs each hour by default.tip
trueto simulate cleanup without actually deleting resources.
plugin_cleanup_aws_alarmssection with the desired target cloud account IDs and setting the
true:cleanup_aws_alarms plugin configuration
# Dictionary of key cloud with list of account IDs for which the plugin should be active as value
# Enable plugin?
Each time the
cleanup_aws_alarms plugin runs, orphaned CloudWatch alarms will be flagged for removal during the next cleanup run.