cookbook 'et_cloudwatch', '~> 1.0.4'
et_cloudwatch (4) Versions 1.0.4 Follow0
Provides a resource for setting up CloudWatch alerts
cookbook 'et_cloudwatch', '~> 1.0.4', :supermarket
knife supermarket install et_cloudwatch
knife supermarket download et_cloudwatch
et_cloudwatch Cookbook
Provides a resource called et_cloudwatch_alarm
that sets up CloudWatch alarms targeted at the node where the resource has been applied.
Requirements
-
et_fog
cookbook (installs Fog for AWS api calls) -
AWS
- Obviously. CloudWatch being an AWS service and all.
Examples
This will set up a CloudWatch alarm called "#{node.name} test alarm":
et_cloudwatch_alert 'test alarm' do
alarm_actions %w(critical_alerts)
statistic 'Average'
threshold 85.0
comparison_operator 'GreaterThanOrEqualToThreshold'
metric_name 'CPUUtilization'
end
Before you can use this example, you must create an SNS topic called critical_alerts
.
Resource Attributes
- Parameters specific to this cookbook
-
access_key_id
/secret_access_key
- Used to specify AWS credentials. Leave these out to use an IAM profile instead. -
mock
- Run in mocking mode (e.g. for testing with Test Kitchen)
-
- Parameters implemented by AWS and documented here (note that "List of Strings" is the equivalent of "array")
-
alarm_description
- Defaults to "Created with et_cloudwatch" -
alarm_actions
- REQUIRED -
comparison_operator
- REQUIRED -
evaluation_periods
- Defaults to 2 insufficient_data_actions
-
metric_name
- REQUIRED ok_actions
-
period
- Defaults to 300 -
statistic
- REQUIRED -
threshold
- REQUIRED unit
-
A note about actions: You have the option of either specifying the entire ARN for an SNS topic OR you can specify just the actual name string (the part after the last colon) and the resource will try to determine the correct ARN automatically based on existing topics in your account.
Actions
The following actions are available:
-
create
- Used in the example above delete
enable
disable
For create, delete, enable, and disable, only the name needs to be specified.
License & Authors
- Author:: Eric Herot eric.herot@evertrue.com
Copyright:: 2015, EverTrue, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Dependent cookbooks
et_fog >= 1.1.0 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Collaborator Number Metric
1.0.4 failed this metric
Failure: Cookbook has 1 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
1.0.4 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
1.0.4 passed this metric
No Binaries Metric
1.0.4 passed this metric
Testing File Metric
1.0.4 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
1.0.4 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
1.0.4 failed this metric
1.0.4 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
1.0.4 passed this metric
No Binaries Metric
1.0.4 passed this metric
Testing File Metric
1.0.4 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
1.0.4 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
1.0.4 passed this metric
1.0.4 passed this metric
Testing File Metric
1.0.4 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
1.0.4 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
1.0.4 failed this metric
1.0.4 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number