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
- In a web browser, open the CloudWatch console at:
- Select .
- Click your log group name under Log groups.
- On the next page, click the Metric filters tab.
- 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.
- Click Create alarm.
- In the group box labeled Metric, locate the
Statistics drop-down list and select
Average.
- In the same group box, select a suitable alarm interval from the
Period drop-down list.
- Under Conditions, select
- 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.
- Click Next.
- Under Notification, select in alarm to
specify that notifications are sent when the alarm is active
- Select Create topic.
- You can leave the suggested SNS topic name unchanged.
- 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.
- Click Next.
- On the next page, enter a name in the Alarm name
field.
- Click Next.
- 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.