Configuring CloudWatch alarms
Once cloud resources are configured, the next step is to configure monitoring and alerts for them to be aware of important notifications about issues and problems in the ever-growing infrastructure. Amazon provides CloudWatch for this type of requirement. In this recipe, we will learn about how to configure CloudWatch alarms for AWS resources.
How to do it...
Create and edit
/opt/ salt-cookbook/production/aws/cloudwatch.sls
to have the following entries:salt-cookbook-alarm: boto_cloudwatch_alarm.present: - name: 'salt-cookbook UnHealthyHostCount' - attributes: metric: UnHealthyHostCount namespace: AWS/ELB statistic: Average comparison: '>=' threshold: 1.0 period: 300 evaluation_periods: 4 unit: null description: salt-cookbook UnHealthyHostCount dimensions: LoadBalancerName: [salt-cookbook] alarm_actions: ['arn:aws:sns:us-west- 2:808429213833:salt-cookbook...