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...

  1. 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 ...

Get Salt Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.