¿How does the billing of Cloudwatch Custom Metrics work?

0

I have installed in two of my ec2 instances the cloudwatch agent to retrieve the data of the memory and disk usage. I was expecting that to count as 2 custom metrics for each of the instances (4 in total), but when I check the list of the free tier offers in use in Billing and Cost Management, I don't see it counting them, since it says I have 0 metrics in usage. Billing and Cost Management

This is the configuration of the cloudwatch agent:

{
	"metrics": {
		"append_dimensions": {
			"InstanceId": "${aws:InstanceId}"
		},
		"metrics_collected": {
			"mem": {
				"measurement": [
					"mem_used_percent"
				],
				"metrics_collection_interval": 60
			},
            "disk": {
				"measurement": [
                     "disk_used_percent"
				],
				"metrics_collection_interval": 60
			}
		}
	}
}

I used these metrics in a dashboard and one alarm. I'm a bit lost with how the billing of the metrics works. I intend to track these metrics in at least 4 instances, so I would like to understand this first.

1 回答
2
已接受的回答

Hi, you are right to assume that memory and disk count as 2 custom metrics for every instance, as the metrics are defined by their namespace, name and set of dimensions.

Please note that Billing and Cost Management is not updated in real time, so you will see accrued usage after 6 to 24 hours.

Also note that metrics usage is pro-rated by the hour, so 1 custom metric is incurred only after sending data for 744 hours to a metric (720 hours if the month has 30 days). If you look at your usage after one business day where your 8 EC2 instances ran for 8 hours, you have sent about 8 metrics for 8 hours, that would be 8 x 8 = 64 hours of sending data to metrics, so the billing and cost management would be aware of only 64 / 744 = 0.09 metrics after that duration.

profile pictureAWS
已回答 5 个月前
profile picture
专家
已审核 5 个月前
  • Thank you very much! Your answer was very helpful.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则