Elastic Compute Cloud (EC2) Instance and System Status Checks.

Status Checks for Instances

With Instance status monitoring we can easily identify whether amazon EC2 has encountere any problem that might prevent our instances and application work properly.

Status checks are peformed every minute and it returns a pass or fail value. If all checks are pass overall status is OK. If one or more status checks fails overall status is impaired.

Types of Status Checks

There are two types of status checks System status check and Instance status check

System Status check

Monitor the AWS system required to use your instance to ensure they work properly this check detech problems which requires AWS intervention to resolve/repair.when System status check occurs we can wait for AWS to resolve the issue or we can stop and start the instance or by terminating and recreating the instance
Follow are the examples of problems that can cause instance status check to fail:

  • Loss of network connectivity
  • Loss of system power
  • Software issues on the ohysical host
  • Hardware issue on the physical host

Instance Status check

Monitor the software and network configuration of individual instance. This check detech problem which require our involvement when instance check fails we only need to take care.like by rebooting the instance or by making instance configuration changes.

  • Failed system check instance
  • Incorrect networking or startup configuration
  • Exhausted memory
  • Corrupted disk/file system
  • Incompatible kernel

Viewing Status Checks

Amazon EC2 provides you with several ways to view and work with status checks.

Viewing Status Using the Console

You can view status checks using the AWS Management Console.

To view status checks using the console

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
  2. In the navigation pane, choose Instances.
  3. On the Instances page, the Status Checks column lists the operational status of each instance.
  4. To view the status of a specific instance, select the instance, and then choose the Status Checks tab.
  5. If you have an instance with a failed status check and the instance has been unreachable for over 20 minutes, choose AWS Support to submit a request for assistance. To troubleshoot system or instance status check failures yourself, see Troubleshooting Instances with Failed Status Checks.

Viewing Status Using the Command Line or API

You can view status checks for running instances using the describe-instance-status (AWS CLI) command.

To view the status of all instances, use the following command:

aws ec2 describe-instance-status

To get the status of all instances with a instance status of impaired:

aws ec2 describe-instance-status –filters Name=instance-status.status,Values=impaired

To get the status of a single instance, use the following command:

aws ec2 describe-instance-status –instance-ids i-1234567890abcdef0

Alternatively, use the following commands:

If you have an instance with a failed status check, see Troubleshooting Instances with Failed Status Checks.

Creating a Status Check Alarm Using the Console

You can create status check alarms for an existing instance to monitor instance status or system status. You can configure the alarm to send you a notification by email or stop, terminate, or recover an instance when it fails an instance status check or system status check.

To create a status check alarm

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
  2. In the navigation pane, choose Instances.
  3. Select the instance.
  4. Select the Status Checks tab, and then choose Create Status Check Alarm.
  5. Select Send a notification to. Choose an existing SNS topic, or click create topic to create a new one. If creating a new topic, in With these recipients, enter your email address and the addresses of any additional recipients, separated by commas.
  6. (Optional) Choose Take the action, and then select the action that you’d like to take.
  7. In Whenever, select the status check that you want to be notified about.
  8. Note
  9. If you selected Recover this instance in the previous step, select Status Check Failed (System).
  10. In For at least, set the number of periods you want to evaluate and in consecutive periods, select the evaluation period duration before triggering the alarm and sending an email.
  11. (Optional) In Name of alarm, replace the default name with another name for the alarm.
  12. Choose Create Alarm.
  13. Important
  14. If you added an email address to the list of recipients or created a new topic, Amazon SNS sends a subscription confirmation email message to each new address. Each recipient must confirm the subscription by clicking the link contained in that message. Alert notifications are sent only to confirmed addresses.

If you need to make changes to an instance status alarm, you can edit it.

To edit a status check alarm

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
  2. In the navigation pane, choose Instances.
  3. Select the instance, choose Actions, select CloudWatch Monitoring, and then choose Add/Edit Alarms.
  4. In the Alarm Details dialog box, choose the name of the alarm.
  5. In the Edit Alarm dialog box, make the desired changes, and then choose Save.

Reference Link

Leave a Reply