Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloudwatch treat missing data #488

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ This file is used to list changes made in each version of the aws cookbook.

## Unreleased

Allow usage of "treat_missing_data" option when creating/updating Cloudwatch alarms.

## 9.1.4 - *2023-12-27*

## 9.1.3 - *2023-10-31*
Expand Down
2 changes: 2 additions & 0 deletions resources/cloudwatch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
property :evaluation_periods, Integer
property :threshold, [Float, Integer]
property :comparison_operator, String, equal_to: %w(GreaterThanOrEqualToThreshold GreaterThanThreshold LessThanThreshold LessThanOrEqualToThreshold)
property :treat_missing_data, String, default: 'missing', equal_to: %w(breaching notBreaching ignore missing)

# authentication
property :region, String, default: lazy { fallback_region }
Expand Down Expand Up @@ -106,6 +107,7 @@ def build_cwh_options
options[:dimensions] = new_resource.dimensions if new_resource.dimensions
options[:extended_statistic] = new_resource.extended_statistic if new_resource.extended_statistic
options[:unit] = new_resource.unit if new_resource.unit
options[:treat_missing_data] = new_resource.treat_missing_data if new_resource.treat_missing_data
options
end

Expand Down