-
-
Save rterbush/68c767f31e8f891b0ffd to your computer and use it in GitHub Desktop.
This file contains 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
{% for host, instance in salt['mine.get']('*', 'instance_id', expr_form='glob').items() %} | |
ensure_EC2_alarm_exists_{{- host}}: | |
boto_cloudwatch_alarm.present: | |
- name: {{ host -}}-cpuutilization-ec2-alarm | |
- region: {{ pillar['aws-region'] }} | |
- attributes: | |
metric: CPUUtilization | |
namespace: AWS/EC2 | |
statistic: Average | |
comparison: '>=' | |
threshold: 50.0 | |
period: 60 | |
evaluation_periods: 5 | |
unit: null | |
description: 'EC2 CPUUtilization Alarm' | |
dimensions: | |
InstanceId: {{ instance }} | |
alarm_actions: ['{{- pillar['aws-noticearn'] -}}'] | |
insufficient_data_actions: [] | |
ok_actions: [] | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment