How to track Global-DataScanned-Bytes usage (CloudWatch free tier)?

0

I got an alarm email that I'm at 85% of the CloudWatch free tier: 5.0 GB are always free per month as part of AWS Free Usage Tier (Global-DataScanned-Bytes)

What is Global-DataScanned-Bytes? There are only two hits on google for this and I can't find anything in AWS documentation. My log groups have only a few tens of megabytes of data, and I checked IncomingBytes for all my log groups, which have about 500kb per day / 3 MB in the last week.

How do I figure out where this usage is coming from? My theory is, I created a dashboard that had a widget to show me logs that contained an error message. Refreshing this dashboard might have been the cause due to scanning the logs. How would I find a metric or graph that proves this?

Thanks

  • just submitted an answer that will solve the issue (hopefully)

2 Answers
1

"Global-DataScanned-Bytes" is a metric used by AWS CloudWatch Logs Insights to track the amount of log data scanned by your queries across all log groups in all AWS regions. It's not well-documented by AWS, hence the limited information available.

To figure out where this usage is coming from and to confirm your theory about the dashboard causing the high usage, you can take the following steps:

  1. Review Queries and Dashboards: Look at any queries or dashboards you've created using CloudWatch Logs Insights. Specifically, check if any queries are scanning large amounts of log data, especially if they are run frequently or on a schedule.

  2. Check Query Efficiency: Ensure that your queries are optimized to minimize the amount of log data scanned. Use filters and conditions to narrow down the scope of your queries, and limit the time range to only what is necessary.

  3. Review Dashboard Widgets: Look at each widget on your dashboard and consider whether it might be causing high data scanning. Widgets that display large amounts of log data or refresh frequently can contribute to increased usage.

  4. Check Query Execution Frequency: If your dashboard widgets or queries are set to refresh frequently, this could result in higher data scanning. Consider adjusting the refresh interval or optimizing the queries to reduce scanning.

  5. Use CloudWatch Metrics: Look for CloudWatch metrics related to your queries and dashboard activity. You can use metrics such as "QueryExecutionTime" or "QueryDataScanned" to monitor query performance and resource usage.

  6. Enable Detailed Monitoring: If you haven't already, consider enabling detailed monitoring for CloudWatch Logs Insights. This will provide more granular metrics that can help you identify the source of high data scanning.

  7. Experiment with Filters: Experiment with different filters and query conditions to see how they affect data scanning. Try to isolate the impact of specific filters or conditions on the amount of data scanned.

By following these steps and carefully reviewing your queries, dashboards, and usage patterns, you should be able to identify the source of high data scanning and take appropriate actions to optimize your usage and stay within the CloudWatch free tier limits.

Mustafa
answered 12 days ago
0

Hi, as explained by Mustafa, "Global-DataScanned-Bytes" is the amount of data queried by Logs insights queries (the "DataScanned-Bytes" usage type) across all regions (the "Global" prefix). Mustafa also shared a great list of steps to look into your usage. I would just like to add that the usage explanation is documented on https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_billing.html

profile pictureAWS
Jsc
answered 12 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions