Removed alarms that aren't needed because the threshold was changed to 100%#46
Open
Removed alarms that aren't needed because the threshold was changed to 100%#46
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
Pull request overview
This PR enhances the CloudWatch alarm management logic to automatically delete alarms when their threshold is set to 100%, in addition to deleting orphaned alarms. The changes track threshold values for CPU, SSD, and volume alarms in dictionaries and use this information during the alarm cleanup phase.
Changes:
- Added threshold tracking dictionaries for CPU, SSD, volume capacity, and volume file alarms
- Modified alarm deletion logic to remove alarms when their associated resource has a 100% threshold
- Cleaned up code formatting (removed unnecessary parentheses, standardized string formatting)
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| FSx_Alerting/Auto-Add-CloudWatch-Alarms/cloudformation.yaml | Updated embedded Lambda function code with threshold tracking and alarm deletion logic |
| FSx_Alerting/Auto-Add-CloudWatch-Alarms/auto_add_cw_alarms.py | Implemented threshold tracking dictionaries and enhanced alarm cleanup to handle 100% thresholds |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.