aws
aws copied to clipboard
Cloudwatch Alarms
:frowning_person: Problem Statement
I'm currently changing the way I'm creating alarms in AWS Cloudwatch. I was using the AWS CLI but now I want to use this cookbook.
The problem I have is that when I was creating alarms using CLI, I could set the value for "Missing data treatment" using this parameter here :
--treat-missing-data breaching
It does not seem to be possible right now using the latest cookbook's version.
:grey_question: Possible Solution
Maybe just adding a new property for the resource and use that property when creating the alarm.
Thanks for your help.
:wave: I took a look and I think it might be supported, can you confirm if insufficient_data_actions
is what you are looking for?
https://github.com/sous-chefs/aws/blob/v8.3.1/resources/cloudwatch.rb#L6
Thanks for your answer, but no. Using insufficient_data_actions
tells CloudWatch what action to take when the alarm falls into Insufficient data
state.
--treat-missing-data breaching
tells CloudWatch that when there is no data found, the alarm should be put in Alarm
state.
Thanks again!
I see; it looks like we would need to add treat_missing_data
to the options in the section I linked above, with the possible values of (breaching | notBreaching | ignore | missing)
, and a default of missing
based on your explanation and a quick review of https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/CloudWatch/Client.html. I am happy to review it if someone wants to take a crack at this.
I would be happy to help. Can I contribute using the guidelines found here : https://github.com/chef-cookbooks/community_cookbook_documentation/blob/main/CONTRIBUTING.MD ?