Notification when ANY status check fails

0

I've seen articles about getting a notification for the StatusCheckFailed metric, but when creating an alarm it appears I HAVE TO specify an instance ID. But we are creating and destroying instances automatically and I want a notification when ANY status check fails. Is there a way to set that up?

shmap
질문됨 일 년 전370회 조회
2개 답변
1
수락된 답변

You've not stated how you are creating these instances but if it's with auto scaling the health check will automatically terminate them and launch a new one.

Alternatively:

  • There may be an Event Bridge rule you can create to pick this up and have an action off the back of it.
  • You could have an alarm created at instance launch and delete on terminate.
  • Write a Lambda to run on a scheduled event to check status.
profile picture
답변함 일 년 전
1

Hi - Not very sure on the use case but if you use auto scaling then one of the check is status checks. Amazon EC2 Auto Scaling uses the results of the Amazon EC2 instance status checks and system status checks to determine the health status of an instance. If the instance is in any Amazon EC2 state other than running, or if its status for the status checks becomes impaired, Amazon EC2 Auto Scaling considers the instance to be unhealthy and replaces it.

Reference : https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-health-checks.html

For other use cases, you can create alarms at instance launch and delete on terminate as needed.

profile pictureAWS
전문가
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠