Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -
- hosts: localhost
- tasks:
- - name: Create Alarm
- ec2_metric_alarm:
- state: present
- region: us-east-1
- name: "Status Check Failed - $AWS_NAME - $INTSATNCE_IP"
- metric: "StatusCheckFailed"
- namespace: "AWS/EC2"
- statistic: "Minimum"
- comparison: ">="
- threshold: 1
- period: 60
- evaluation_periods: 2
- description: "This will alarm when the instance status check fails"
- dimensions: {'InstanceId': '$Instance_ID'}
- alarm_actions: ["arn:aws:sns:us-east-1:XXXXXXXXXXXX:Cloudwatch-Notifications"]
- var1:
- AWS_Name: NAME1
- Instance_ID: i-01b8e4534wt811af4
- Instance_IP: "10.75.169.21"
- var2:
- AWS_Name: NAME2
- Instance_ID: i-4566eftuiw93045
- Instance_IP: "10.75.169.16"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement