where to view the output of Cloudwatch metric filters

0

I have trying apply metric filter to logs on Cloudwatch using the AWS article Example: Count occurrences of a term. But I am not sure where to find the output of the metric filter. I will also like to send the output to an email address daily if possible.

Where should I retrieve/view the log events after I have created a metric filter as below:

aws logs put-metric-filter \
  --log-group-name MyApp/message.log \
  --filter-name MyAppErrorCount \
  --filter-pattern 'Error' \
  --metric-transformations \
      metricName=ErrorCount,metricNamespace=MyNamespace,metricValue=1,defaultValue=0

To Post Events using AWS CLI:

aws logs put-log-events \
  --log-group-name MyApp/access.log --log-stream-name TestStream1 \
  --log-events \
    timestamp=1394793518000,message="This message contains an Error" \
    timestamp=1394793528000,message="This message also contains an Error"

What is the purpose of timestamp in the above put-log-events Where would the above logs (put-log-events) be posted to be viewd?

profile picture
Lottie
asked 2 months ago142 views
1 Answer
1

where to view the output of Cloudwatch metric filters?

If you're utilizing the CLI, you can employ the describe-metric-filters command. Refer to the documentation here.

What is the purpose of timestamp in the above put-log-events?

The timestamp denotes the time the event occurred, and you can find additional details about it in the documentation.

Where would the above logs (put-log-events) be posted to be viewd?

You can retrieve log events from the designated log stream by utilizing the get-log-events command. Further details can be found here.

You can monitor all logs via the management console by accessing CloudWatch.

log groups and logs

profile picture
EXPERT
answered 2 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions