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 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南