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
질문됨 3달 전155회 조회
1개 답변
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
전문가
답변함 3달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠