Creating AWS CloudWatch alarms based on a metric filter

Configure CloudWatch alarms to emit a visual or audible alarm when the condition of a metric filter has been met and a notification has been sent. Alarms are set off in addition to filter notifications to ensure that you won't miss important log events.

About this task

The AWS article

Create a CloudWatch alarm based on a log group-metric filter

served as the basis for the following procedure.

Procedure

  1. In a web browser, open the CloudWatch console at:
  2. Select Logs > Log Group.
  3. Click your log group name under Log groups.
  4. On the next page, click the Metric filters tab.
  5. The details of your metric filters are summarized on large tiles with a white background. Find the metric filter that you want to add an alarm to. On the tile for that filter, select the check box in the upper right corner.
  6. Click Create alarm.
  7. In the group box labeled Metric, locate the Statistics drop-down list and select Average.
  8. In the same group box, select a suitable alarm interval from the Period drop-down list.
  9. Under Conditions, select
    1. Static
    2. Greater
  10. In the ... than field, enter 1 as the threshold value.
    This means that an alarm will be triggered each time the condition in the metric filter is met.
  11. Click Next.
  12. Under Notification, select in alarm to specify that notifications are sent when the alarm is active
  13. Select Create topic.
  14. You can leave the suggested SNS topic name unchanged.
  15. In the Email endpoints that will receive the notification field, enter the email address of all users that you want to send an SNS notification to when the alarm is active. Separate the addresses by a comma.
  16. Click Next.
  17. On the next page, enter a name in the Alarm name field.
  18. Click Next.
  19. Review the details of the alarm. When finished, click Create alarm.

What to do next

The alarm creation might end with the status message Some subscriptions are pending confirmation. In this case, click View SNS subscriptions next to message. You might have to create a subscription to make the alarm work.