How to find out CloudWatch GetMetricData cost is for which log group?
Asked Answered
D

3

6

We have recently huge cost increasing (x8 times) on CloudWatch GetMetricData operation. We have a lot of log groups and different teams on the same Aws Account.

Do you know how could we find out the GetMetricData is for which log group ?

Thanks.

Delwin answered 4/8, 2020 at 20:12 Comment(2)
Cloudtrail is pretty much the only wayUnbidden
GetMetricData is for cloudwatch metrics, not cloudwatch logsUnbidden
E
2

Unfortunately, there's no easy answer your question. We had the same issue where a line on the bill call "GetMetricsData API" was getting completely out of control. It's a shame AWS CloudTrail does not log such request. To discover the root cause, we had to disable all external monitoring tool we had plugged on this account one by one and monitor for a dent in the bill. See this article.

Enmity answered 9/2, 2022 at 20:52 Comment(0)
C
1

I know the post is old, but I have the reference about one of the main cost offenders in the GetMetricsData API. Try disabling it and you'll see savings.

Amazon Security Hub

Congressman answered 24/4 at 16:49 Comment(0)
T
0

AWS does not tie the charges of GetMetricData to specific CloudWatch Log Groups so sadly this is not possible to see. The only things that you can see on a per log group basis are "processing bytes" and storage. If you believe that those could be close proxies, then you can query them directly via Cost and Usage Reports...but it may be that ingestion costs are not at all tied to querying of metric data.

An alternative hosted solution for seeing all of this data aggregated together would be https://www.vantage.sh/ which will query for all CloudWatch log groups and show you all the costs that it can on a per Log Group basis but you'll need to enabled "Advanced Analytics" from them.

Tool answered 21/2, 2022 at 22:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.