Alarm on EC2 metrics without specifying instanceID dimension

0

I'd like to attach a single "catch all" CPUUtilization metric alarm to all EC2 instances currently or in future deployed to an account. The use case would be something like "tell me if any running instance exceeds 90% CPU". I don't think this is possible, but would like to rule it out before implementing something more complex.

I recall reading somewhere that there is a minimum set of dimensions required on an EC2 alarm but can't find that document again. The answer to https://repost.aws/questions/QU5oxWWfePRF-FCJ3UvoeN2Q/create-one-cloudwatch-alarm-for-multiple-instances also suggests this isn't possible, but is a slightly different question in that it's asking about a) on-prem and b) a defined subset of instances rather than all.

When deploying alarms through the console it is necessary to select an instance since CPUUtilization is an instance level metric. It is possible though to deploy a CPUUtilization alarm without any dimensions using CloudFormation (dimensions is not a mandatory field), but the alarm then remains in a perpetual state of INSUFFICIENT_DATA.

Thanks in advance for any insight you're able to offer.

demandé il y a 2 ans243 vues
1 réponse
2
Réponse acceptée

I just created an alarm where I choose "Across All Instances", CPUUtilization, Maximum >= 90. It created an alarm with an empty Dimension array. Getting metrics and status set to OK.

profile pictureAWS
EXPERT
kentrad
répondu il y a 2 ans

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