We Are Hiring

Amazon CloudWatch, A monitoring tool.

What is CloudWatch ?

Amazon CloudWatch is a monitoring service to monitor your AWS resources as well as the applications that you run on AWS.

What can CloudWatch Do ?

Cloud Watch can monitor things like;

  1. EC2.
  2. DynamoDB
  3. RDS DB Instances etc.
  4. As well as monitoring the services CloudWatch also has the ability to monitor custom metrics generated by your applications and services.
  5. CloudWatch can also monitor any log files your applications generated.

CloudWatch & EC2

Default monitoring is host level monitoring by CloudWatch. Default monitoring resources:

  1. CPU
  2. Network
  3. Disk
  4. Status Check

RAM Utilization is a custom metric, By default EC2 monitoring is 5 minutes internals, unless you enable detailed monitoring which will then make it 1 minute intervals. Remember: RAM Utilization is not host level metric, it is custom metric.

EC2 Status Checks

  1. System Status Checks:-

    Checks the underlying physical host. So just remember that system equal to physical host. So your physical host is going to either be your rack mounting servers or blade inside your blade chassis is the actually physically host that is hosting your virtual machine. System status check is always going to check the host that the virtual machine is sitting on.

Loss of network connectivity. Loss of system power. Software issues on the physical host. Hardware issues on the physical host. Best way to resolve issues is to stop the virtual machine and start it again and the reason for that is when you stop the virtual machine and you start it again. The virtual machine can startup on another physical host.

  1. Instance Status Checks :-

    It checks virtual machine itself.

Failed system status checks Mis-configured networking or startup configuration Exhausted memory Corrupted file system Incompatible kernel Best way to trouble shoot is by rebooting the instance or by making modifications in your operating system.

How Long are CloudWatch Metrics Stored ?

By Default CloudWatch Metrics stored for 2 Weeks. You can retrieve data that is longer than 2 weeks using the GetMetricStatistics API or by using third party tools offered by AWS partners.

You can retrieve data from any terminated EC2 or ELB instance for up to 2 weeks after it’s termination.

Metric Granularity ?

It depends on the AWS service. Many default metrics for many default services are 1 minute, but it can be 3 or 5 minutes depending on the service.

For custom metrics the minimum granularity that you can have is 1 minute.

CloudWatch Alarms

You can create an alarm to monitor any Amazon CloudWatch metric in your account. This can include EC2 CPU Utilization, Elastic Load Balancer Latency or even the charges on your AWS bill so let say you got budget of 50$ and you want to know alert when you coming into like 45$ for the month. You can actually setup a custom CloudWatch alarm which will send you a notifications saying you hit 45$ you close to your 50$ budget for the month. You can set the appropriate thresholds in which to trigger the alarms and also set the what actions should be taken is an alarm state is reached.