Advertisement
Guest User

Untitled

a guest
Sep 19th, 2017
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. -
  2. hosts: localhost
  3.  
  4. tasks:
  5.  
  6. - name: Create Alarm
  7. ec2_metric_alarm:
  8. state: present
  9. region: us-east-1
  10. name: "Status Check Failed - $AWS_NAME - $INTSATNCE_IP"
  11. metric: "StatusCheckFailed"
  12. namespace: "AWS/EC2"
  13. statistic: "Minimum"
  14. comparison: ">="
  15. threshold: 1
  16. period: 60
  17. evaluation_periods: 2
  18. description: "This will alarm when the instance status check fails"
  19. dimensions: {'InstanceId': '$Instance_ID'}
  20. alarm_actions: ["arn:aws:sns:us-east-1:XXXXXXXXXXXX:Cloudwatch-Notifications"]
  21.  
  22. var1:
  23. AWS_Name: NAME1
  24. Instance_ID: i-01b8e4534wt811af4
  25. Instance_IP: "10.75.169.21"
  26. var2:
  27. AWS_Name: NAME2
  28. Instance_ID: i-4566eftuiw93045
  29. Instance_IP: "10.75.169.16"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement