Collecting data from all the points of your AWS solutions is important as it is really helpful in debugging a failure especially one which might have made multiple points inoperable. Monitoring is no easy task but it indeed is worth the effort and the time put in considering it can save you a longer downtime. In order to be on top of your EC2 instances, it is recommended that you measure the performance of your instance at different times with different loads and see the reaction of the instance. This will help you in concluding the maximum capacity of your instance.

How to Monitor the Status of Amazon EC2 Instances? - 1

Amazon EC2

You can also create images of your instances often so you can be quickly back online in case of a data loss or a hardware failure. Nonetheless, moving on to the topic at hand, there are two types of monitoring options that AWS provides i.e. automated monitoring in which you have to configure the tools to do all the monitoring that you need. The second type is manual monitoring which, as obvious from the name, involves manual interventions of the IT admins to reach the desired outcome. We will be focusing on automated monitoring in this guide.

Instance Status Checks

There are two types of checks that are performed, System status checks and Instance status checks. System status checks are problems that require AWS involvement to fix the issue such as power loss, no network connectivity, etc. Instance status checks need your involvement to repair the issue and often detect problems like a corrupted file system, incorrect networking configuration, etc.

Viewing Status Checks

You can view the status checks of your EC2 instances on the AWS Management Console. Here’s how to view it:

  1. Log in to the AWS Management Console and go to EC2 .
  2. From the navigation pane on the left-hand side, click Instances .
  3. Now, on the Instances page, click on Status Checks under the instances list. EC2 Status Checks
  4. Make sure to select the instance for which you want to see the status check. If anything fails, you can find more information about it under Monitoring .

Other than Status checks, you can find additional information about your instance under Monitoring. It shows information about various metrics via real-time graphs so that it is easier for you to comprehend and read. From CPU Utilization to disk operations such as disk read or disk writes, from inbound network to outbound network in bytes, all of it and much more are available under Monitoring.

Here’s how to view the data:

  1. Go to the EC2 Management Console .
  2. On the left-hand side, click on Instances and then select the Instance for which you wish to see the data.
  3. Click Monitoring in the tab below to view various information in real-time. EC2 Monitoring Tab
  4. You can also change the graphs to show the collected data of various periods; up to the last two weeks. To do this, just choose an option in the Showing data for the drop-down menu on the top-right corner of the tab.
  5. Click on a graph to change how the data is collected for the specific metric. You can change the Period as well as the Statistic of the metric. Monitoring Details
  6. For more detailed monitoring, you can enable CloudWatch detailed monitoring which will cost you a bit more. To do this, just click on the Enable Detailed Monitoring option provided and then click Yes, Enable on the pop-up dialog box. Then, click Close .

Creating an Alarm

  1. Login to the EC2 Management console . Go to Instances from the navigation pane on the left-hand side. Select the instance for which you wish to create an alarm. Go to the Monitoring tab and then click the Create Alarm button. EC2 Monitoring Tab Click on the create topic option to give the notification a title. After that, provide the email addresses that should receive the notification in the With these recipients box. If you wish to take any action when the alarm is triggered, check the Take the action box. Then, choose if you wish to reboot the instance which means restart the operating system, stop the instance, terminate, or recover the instance. Creating an Alarm Choose the specific metric for which you wish to create the alarm and then provide a criteria for the alarm policy. For example, if you wish to be notified whenever the CPU Utilization reaches/exceeds 80 percent, leave Whenever to Average and set the Is to >= to 80 . After that, you can provide a period for the threshold . Finally, give the alarm a name in the Name of alarm box and then click the Create Alarm button. This will create your alarm and you will be notified whenever the metric threshold reaches your provided threshold.

Similarly, you can create status checks alarms using which you can perform the same actions if a certain status check fails. To create a status check alarm, go to the Status Check s tab, and then click on the Create Status Check Alarm button. The rest of the procedure is the same as above.

How to Fix “Printer is in an error state” Issue?