LogicMonitor’s AWS DataSources rely on the CloudWatch API to get data for your AWS resources. AWS offers 1 million free CloudWatch API requests per month, however; API requests beyond that free tier cost $.01/1000 requests. Depending on which AWS services you are monitoring and how many resources you are monitoring, you may see CloudWatch costs associated with LogicMonitor’s AWS Monitoring.
In addition to estimating them, this article focuses on the following three approaches to reduce CloudWatch spend:
- Reducing metric granularity
- Monitoring fewer metrics
- Monitor fewer devices
Can I estimate CloudWatch costs?
Yes – You can estimate the CloudWatch costs if you understand the details around how LogicMonitor makes requests to the CloudWatch API and reference AWS’s published CloudWatch Pricing page.
LogicMonitor makes one CloudWatch API request to the GetMetricStatistics resource per normal datapoint collected, per polling interval of the DataSource. The reason behind this approach is that AWS restricts requests to this API resource to be per metric. Because we want to make sure you get as close as possible to real-time alert evaluation, most of our CloudWatch
DataSources poll every 1 – 5 minutes, depending on how often CloudWatch metrics are published for the service in question.
As previously stated, AWS offers 1 million free CloudWatch API requests per month, and charges $.01/1000 requests beyond that. That means, if you surpass the free tier, you can essentially consider it to be $10 off your monthly CloudWatch bill. If you are using the default CloudWatch DataSources, you can estimate the costs per resource per month by multiplying the number of datapoints by the number of times each datapoint will be polled per month (according to the polling interval) and multiplying that by the 1 cent per 1000 API calls rate. This estimate will vary from service to service based on the associated Datasource’s polling interval and the number of datapoints. Here are a few examples of what the calculation looks like:
- APIGateway: 7 datapoints * (60min/hour * 24 hours/day * 30days/month)/2min polling interval * ($.01/1000) = $1.50 per API Gateway resource / month
- CloudFront: 6 datapoints * (60min/hour * 24 hours/day * 30days/month)/2min polling interval * ($.01/1000) = $1.30 per CloudFront resource /month
- DynamoDB: 10 datapoints * (60min/hour * 24 hours/day * 30days/month)/5min polling interval * ($.01/1000) = $0.86 per DynamoDB table/month
- EBS: 8 datapoints * (60min/hour * 24 hours/day * 30days/month)/5min polling interval * ($.01/1000) = $0.68 per EBS volume/month
- EC2: 11 datapoints * (60min/hour * 24 hours/day * 30days/month)/5min polling interval * ($.01/1000) = $0.93 per EC2 instance/month
- EFS: 24 datapoints * (60min/hour * 24 hours/day * 30days/month)/2min polling interval * ($.01/1000) = $5.18 per EFS instance/month
- S3: 3 datapoints * (60min/hour * 24 hours/day * 30days/month)/1hour polling interval * ($.01/1000) = $.02 per S3 bucket/month
As a best practice, we recommend reading the section below to optimize your CloudWatch costs.
How can I reduce these CloudWatch costs?
There are several ways to make sure your CloudWatch costs remain at a manageable level:
- Use Collector DataSources where possible – if you are monitoring EC2 instances, LogicMonitor’s Collector DataSources typically report more in-depth metrics than what CloudWatch reports (and don’t rely on the CloudWatch API). As such, we recommend that you install a Collector in your AWS environment & rely on Collector DataSources instead of the AWS_EC2 CloudWatch DataSource. If you disable monitoring for the AWS_EC2 DataSource, you would be saving almost a dollar per instance per month in CloudWatch costs (per the estimate above). However, any cloud resource monitored with a collector will count towards a normal device license, and not a cloud license.
- Increase Polling Intervals – by default, most CloudWatch DataSources poll every 1 to 5 minutes. You can increase these polling intervals to poll less frequently, which will reduce the number of CloudWatch API calls made (and therefore your CloudWatch bill). Keep in mind that increasing the polling interval will impact alert evaluation. For example, if you change all polling intervals to every 10 minutes, you may not know about a possible alert condition for longer. Note that polling intervals can be changed in the DataSource definition.
- Determine which datapoints are meaningful to you – certain AWS DataSources have over 20 datapoints (e.g. EFS). If some of those datapoints aren’t meaningful to you, you can remove them from the DataSource definition. This will result in fewer CloudWatch API calls and therefore minimize your CloudWatch costs. Best practice for this would be to clone the existing DataSource, set the appliesTo function to “false()” to prevent duplicated CloudWatch calls, and remove the unwanted datapoints from the clone. This prevents your changes from being overridden when updating DataSource definitions.
- Deselecting AWS regions to monitor – You may be monitoring multiple regions within your AWS account, which you may not want to. You may deselect the regions that you do not want to monitor and save the costs as well. However, when you deselect the AWS regions, the monitoring data is deleted.
- Using tag filter – You can set up tag filtering using your AWS cloud integration, which allows LogicMonitor to only discover AWS resources with a particular tag applied to them. Applying these tags to the desired AWS resources allows you to save on CloudWatch costs as well.