CloudWatch: count number of requests from cloudwatch logs and create alarm

0

I am logging userid in cloudwatch logs and need to count the no. of requests for the same userid in last 1 hour and have to create an alarm. Basically need to do that for each userid. So is there a way we can achieve this using Cloudwatch metric? Or any other AWS service?

質問済み 1年前713ビュー
1回答
0

If I understood your requirement correctly you have a log group that captures records of user logging which includes the userid field and you need to set an alarm if one or many of these userids if they reach a certain threshold within an hour.

I would suggest creating a metric filter on your log group as described here -> https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CreateMetricFilterProcedure.html

Then setup a cloudwatch alarm based on the metric filter you created -> https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Create_alarm_log_group_metric_filter.html

profile picture
Bisina
回答済み 1年前
  • so I need to setup this for each user id?

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ