Creating AWS CloudWatch metric filters for Data Gate on Cloud logs

An AWS CloudWatch metric filter allows you to specify string patterns that will, when encountered in your CloudWatch logs, trigger the sending of a notification. This is useful if, for example, you want to be notified of certain errors, but not of every message that is written to your CloudWatch logs.

About this task

The AWS article

Create a metric filter for a log group

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. Select the check box in front of your log group name.
  4. Select Actions > Create metric filter.
  5. In the Filter pattern field, enter a log filter pattern that will set off notifications.
    Example:
    %AQT10003E%

    This pattern triggers a notification each time a string is encountered in the logs that contains the error code AQT10003E.

  6. Click Next. Then enter a name for your metric filter.
  7. In the Metric namespace field, enter the namespace name or leave this field blank and make sure that Create new is selected.
  8. In the Metric name field, enter a name for your metric.
  9. In the Metric value field, enter 1, so that a single occurrence of the pattern sets off a notification.
  10. From the Unit drop-down list, select Count as the unit of your metric value.
  11. Click Next to review your metric filter.
  12. Click Create metric filter.