Home > Back-end >  CloudWatch - create an alarm to monitor CPUUtilization of production servers?
CloudWatch - create an alarm to monitor CPUUtilization of production servers?

Time:01-31

Let's say I have several EC2 instances with the environment=production tags on them. I know I can create a graph with the "metrics explorer" that will aggregate the CPUUtilization of all those EC2 instances based on this tag. However, I can't see an option to set an alarm on this aggregate.

I also know that I can set an alarm on a Metrics Insights query, but as far as I know I cannot, using the Metrics Insight query, get this aggregate of CPUUtilization of instanes based on tag.

So my question is, say I want to have an alarm on the aggregated CPUUtilization of those instances, is there a way to do this?

CodePudding user response:

After you filter your EC2 instance on metrics explorer then on dashboard click three dots and View on metrics.

View on metrics

it will display all EC2 instances with one additional graphed metrics with name All resources with value AVG([m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13]).

All resources metric

Then you can create your alarm from this new aggregated metric.

Note: This metric will not be dynamic a metric, when you create a new instance with environment=production tag, it will not be include.

  • Related