AWS CloudWatch unused custom metrics retention and pricing - 2018 - amazon-web-services

It looks like custom metrics will be kept for 15 months, if I understand it correctly, since they get aggregated to higher resolution, according to https://aws.amazon.com/cloudwatch/faqs. Does it mean we have to pay for at least 15 months once we create a custom metric?
I have CloudWatch agent installed to collect various metrics using user_data. It creates new metrics for every new instances. After running many tests, I have more than 6,000 custom metrics, but most of them are unused. Since there is no way to delete custom metrics, do I get charged for those unused metrics until they expire (15 months)? I hope I'm wrong on this :]
Please clarify how we get charged for unused custom metrics.

You will not get charged for those. You will get charged for the metric for the duration you publish data onto them. It's not very clear on the CloudWatch pricing page but they hint it in the [original pricing reduction blogpost]{https://aws.amazon.com/blogs/aws/aws-price-reduction-cloudwatch-custom-metrics/).
You will get charged though on the retrieval of those (API costs).

we have the same issue to resolve. waiting for clearification from aws

Related

AWS Cloudwatch - List Custom Metrics

I am trying to figure out how to simply view all of our custom metrics in CloudWatch.
AWS Console is far from helpful, or at least it's not well signposted. I want to try and relate our CloudWatch bill to actual metrics we have to try and determine where I can make some cuts.
For Example:
Our Bill shows 1,600 Metrics charged at $0.30 a piece per month, but I see over 17,000 custom namespaces in the metrics list within the CloudWatch console.
Does anyone know how I can best find this information, or have a nice handy CLI command to view all custom metrics for a region?
I can see the custom namespaces section in cloud watch, but these don't really marry up to the billing page as such. By about a 10 fold.
Thank you.
UPDATE:
I think I may have identified why there is a discrepancy between the billing and the list of metrics:
We have namespace builds, each creating metrics and being destroyed sometimes within hours.
These metrics which were created linger for 15 days according to the AWS FAQ on CloudWatch Metrics.
The overall monthly metrics seemingly is a figure of what it is due to the concurrency of metrics over the month.
However, this still doesn't make the billing breakdown any easier to understand when you're trying to highlight possible outliers in costs.

AWS CloudWatch is charging me without using

Recently i discovered my bill raising without using anything above free tier of with very minor charges.
On the bill management page it was clear that the charges are coming from CloudWatch Alarms as you can see in the picture below.
My question is why and how can i stop them? I can see that the alarms are been created by DynamoDB
auto-scaling, but i can't continue being charged for such a simple thing, i'm sure there is an option to disable it but i can't figure out.
Edited I checked "hide auto-scaling alarms" box but i think it's not the fix, fingers crossed to be:P
This is part of DynamoDB AutoScaling. For a small project, you should consider using DynamoDB without Provisionned Throughput.
AWS Free Tier includes 10 Alarm metrics (not applicable to high-resolution alarms).
See How can I determine why I was charged for CloudWatch usage, and then how can I reduce future charges?

Cloudwatch for billing alarm in daily based using cloudwatch metric

May I ask is there any way that I can make a billing alarm for a daily based cost via cloudwatch metric?
I know that billing alarm is in monthly basis. Is there a possiblity that I can create a custom metric to get the daily cost then set a threshold let say if I spend $2 on AWS Lambda service it will trigger and notify via sns.
Thanks! Any help would be appreciated.
You can use the AWS Cost Explorer API to programmatically retrieve cost and usage metrics for your account. You can query for aggregated data such as total monthly costs or total daily usage, but you can also query for granular data.
To solve your requirement, you could set up a scheduled CloudWatch Event that triggers a Lambda, which in turn analyzes (and reports on) the cost and usage data from the previous day or get the cost forecast for a specified time period in the future.
Here's the AWS Cost Explorer API Documentation.

Cloudwatch - Metrics are expiring

I currently have a bunch of custom metric's based in multiple regions across our AWS account.
I thought I was going crazy but have now confirmed that the metric I created a while ago is expiring when not used for a certain time period (could be 2 weeks).
Here's my setup.
I create a new metric on my log entry - which has no expiry date;
I then go to the main page on CloudWatch --> then to Metrics to view any metrics (I understand this will only display new metric hits when there are hits that match the metric rule).
About 2 weeks ago, I had 9 Metrics logged under my "Custom Namespaces", and I now have 8 - as if it does not keep all the data:
As far as i'm aware, all my metrics should stay in place (unless I remove them), however, it seems as though if these are not hit consistently, the data "expires", is that correct? If so, how are you meant to track historical data?
Thanks
CloudWatch will remove metrics from search if there was no new data published for that metric in the last 2 weeks.
This is mentioned in passing in the FAQ for EC2 metrics, but I think it applies to all metrics.
From 'will I lose the metrics data if I disable monitoring for an Amazon EC2 instance question' in the FAQ:
CloudWatch console limits the search of metrics to 2 weeks after a
metric is last ingested to ensure that the most up to date instances
are shown in your namespace.
Your data is still there however. Data adheres to a different retention policy.
You can still get your data if you know what the metric name is. If you added your metric to a dashboard, it will still be visible there. You can use CloudWatch PutDashboards API to add the metric to a dashboard or use CloudWatch GetMetricStatistics API to get the raw data.

How do you delete an AWS CloudWatch metric?

I am decommissioning a service in Amazon Web Services DynamoDB. We have various metrics and alarms for our DyDB tables. I am able to delete the alarms using 'aws cloudwatch delete-alarms --alarm-names ...' but I do not see any AWS CLI command to delete metrics.
I know metrics keep data for 2 weeks. Is it possible that the metrics will automatically disappear in 2 weeks when no more data is being stored in it? I see no documentation stating that, unfortunately.
You're correct: there is no API to delete AWS Cloudwatch Metrics.
Just wait two weeks after your last metric has been pushed. It will disappear automatically.
Since November 1, 2016, CloudWatch has extended the retention of metrics (both custom and AWS NameSpace) from previous 14 days to 15 months.
But the CW console limits the search of metrics to 2 weeks after a metric is last ingested (which means if there is a metric in which no datapoints has been pushed for past 14 days then the CW console will not display it but you can still get it using the cli get-metric-statistics or by tweaking the console url to refer the correct resource name and start and end time older than 14 days).
And there is no api to delete the metrics.
https://aws.amazon.com/cloudwatch/faqs/
https://aws.amazon.com/cloudwatch/faqs/
Amazon CloudWatch FAQs
[…]
Q: What is the retention period of all metrics?
CloudWatch retains metric data as follows:
Data points with a period of less than 60 seconds are available for 3 hours. These data points are high-resolution custom metrics.
Data points with a period of 60 seconds (1 minute) are available for 15 days
Data points with a period of 300 seconds (5 minute) are available for 63 days
Data points with a period of 3600 seconds (1 hour) are available for 455 days (15 months)
Data points that are initially published with a shorter period are aggregated together for long-term storage.
[…]
Q: Can I delete any metrics?
CloudWatch does not support metric deletion. Metrics expire based on the retention schedules described above.
In support of the above, this is still an issue unfortunately. To read more on the AWS forum, please see:
https://forums.aws.amazon.com/message.jspa?messageID=281904