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
gefragt vor 3 Monaten155 Aufrufe
1 Antwort
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
EXPERTE
beantwortet vor 3 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen