Cloudwatch - parse log and look for 2 different things

0

Afternoon all. I have a server that is putting out a log directly to cloudwatch, pretty simple, the first value is either INFO, WARNING or ERROR then other data. I wish to count and graph the warnings and errors in cloudwatch and have this running with 2 metric filters. I have a few other projects and before I do this, I was reading a bit on dimensions, but the apache example is a bit tough to follow, so before I really spend the time, can I create 1 metric filter, separate those values and graph/count them separate OR am I better using 2 metrics. I know they charge the more you have, and I want to understand the dimension part as I have a few other projects and want to fully understand this.

Thanks!

質問済み 10ヶ月前442ビュー
1回答
1
承認された回答

Only one metric will be created per metric filter.
So if you want to create two metrics, you need to create two metrics filters.
As described in the documentation, dimensions serve as unique identifiers of metrics.
In other words, it is used to add an additional perspective to something that cannot be distinguished by namespace and metric name alone.
Therefore, even if multiple metrics filters have the same metric name, they can be identified by separating the dimensions.
Setting a dimension does not separate the two metrics.
https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/MonitoringLogData.html

profile picture
エキスパート
回答済み 10ヶ月前

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

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

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

関連するコンテンツ