1 Risposta
- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
0
Assuming this is the use case: To stop the EC2 instance when the CPUUtilization is less than X%.
Depending on whether or not detailed monitoring is enabled for the EC2 instance, the period for your alarm must be selected accordingly. Enable or turn off detailed monitoring for your instances. In case of detailed monitoring the metrics is populated with datapoints every minute.
- Without detailed monitoring enabled, selecting a period of 5-min 'or' above should give the alarm enough datapoints for evaluation i.e. regardless of "Datapoints to alarm" value - the alarm will not have missing datapoints as long as the metric is populated every 5 minutes.
- Regarding statistics you choose for the alarm - I'd recommend to use 'Average' but any other statistic is valid/appropriate for this metric.
- If the alarm is continuing to maintain its state when there is missing data check for the configuration of Missing data treatment, whether it is set to
ignore
. Change it to eitherbreaching
,notBreaching
ormissing
as per your use case. Read more about missing data here.
If you are new to CloudWatch alarms, see if this documentation helps in creating an alarm to stop EC2 instance using CPUUtilization metric, read this: Add stop actions to CloudWatch alarms.
Contenuto pertinente
- AWS UFFICIALEAggiornata 3 anni fa
- AWS UFFICIALEAggiornata 9 mesi fa