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달 전

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

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

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

관련 콘텐츠