3

I want to know the number of EC2 instances I have running over time. I am able to view this data from the following menu:

  • ec2 dashboard
    • Auto Scaling Groups
      • select my group from the table of groups
        • select monitoring tab
          • select graph of Total Instances ( Count )

the url for this view should look something like this

https://<region>.console.aws.amazon.com/ec2/autoscaling/home?region=<region>#AutoScalingGroups:id=<my-id>;view=monitoring;SH_S=Successful

(specific information to my application replaced with <text>)


However, if I wanted to replicate this query in AWS CloudWatch, I do not know what search term to use in the query language. The default query provided when I attempt to generate a graph is

SEARCH('{AWS/EC2,InstanceId} MetricName="CPUUtilization"', 'Average', 300)

When I search the documentation for "Available CloudWatch Metrics for Your Instances" I do not see any metric that will let me determine the number of running instances at a given time. I found the SampleCount term; however, this is the count of data points sampled for the statistic.

auerbachb
  • 131
  • 1

0 Answers0