i've created successfully a custom metric by SDK but i'm not able to remove it I can't find the option from the web console to remove it (from SDK as well, i cant find a method to remove/cancel it)
//the code is not important, i've pasted it just to show it works
IAmazonCloudWatch client = new AmazonCloudWatchClient(RegionEndpoint.EUWest1);
List<MetricDatum> data = new List<MetricDatum>();
data.Add(new MetricDatum()
{
MetricName = "PagingFilePctUsage",
Timestamp = DateTime.Now,
Unit = StandardUnit.Percent,
Value = percentPageFile.NextValue()
});
data.Add(new MetricDatum()
{
MetricName = "PagingFilePctUsagePeak",
Timestamp = DateTime.Now,
Unit = StandardUnit.Percent,
Value = peakPageFile.NextValue()
});
client.PutMetricData(new PutMetricDataRequest()
{
MetricData = data,
Namespace = "mycompany/myresources"
});
it created a metric named "mycompany/myresources" but i can't remove it
Amazon CloudWatch retains metrics for 15 months.
From Amazon CloudWatch FAQs - Amazon Web Services (AWS):
CloudWatch retains metric data as follows:
So, just pretend that your old metrics don't exist. Most graphs and alarms only look back 24 hours, so old metrics typically won't be noticed, aside from appearing as a name in the list of metrics.