En utilisant AWS re:Post, vous acceptez les AWS re:Post Conditions d’utilisation

¿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 réponse
2
Réponse acceptée

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
répondu il y a 5 mois
profile picture
EXPERT
vérifié il y a 4 mois
  • Thank you very much! Your answer was very helpful.

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions