¿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.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠