O'Reilly logo

Salt Cookbook by Anirban Saha

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required