imrichardcole
imrichardcole

Reputation: 4675

Cloudwatch metrics by instance name or type

I've got CPU metrics working but it relies on specifying the EC2 instance by name ie i-1234567.

How can I create a CPU dashboard widget/monitoring that will show me CPU by a constant identifier ie "web-server" so that my dashboards/monitoring will work as instances are created and destroyed?

Upvotes: 2

Views: 1563

Answers (1)

WarrenG
WarrenG

Reputation: 1850

Unfortunately there isn't a simple way to do this with Cloudwatch. You would need to make use of a Lambda function, which can be set to run on a periodic basis - or on EC2 instance creation.

AWS has provided an example of how to do this here, but note that it requires some programming skill in order to achieve the desired results:

Keeping CloudWatch Dashboards up to date using AWS Lambda

Upvotes: 1

Related Questions