AWS Certification Training - Solutions Archit ...
- 93k Enrolled Learners
- Live Class
Amazon CloudWatch is a monitoring service for AWS cloud resources and the applications you run on AWS. It is used to collect and track metrics, collect and monitor log files, and set alarms.
Before getting started with Amazon CloudWatch it’s important to know the items it enables the user to monitor:
With Amazon CloudWatch, the user can get:
Why is Amazon CloudWatch useful?
To get started with CloudWatch, the user signs up for Amazon EC2 service; once that is complete the registration for Amazon CloudWatch is automatically done and the feature can be accessed using the AWS Management Console.
There are two types available for EC2
Basic Monitoring – it provides monitoring of data every 5 minutes which is also free of cost.
Detailed Monitoring – charges you every minute.
One key point to understand is that Amazon CloudWatch is to monitor Amazon Service and not the user’s services. If the user has deployed a server Inside EC2, Amazon CloudWatch by default will not monitor it. An important point to note is that in Amazon, we don’t control the hardware. It monitors software but only for Amazon services.
Here are the steps to be followed to get started with Amazon CloudWatch
It would charge per metrics. In EC2 there are 7 metrics. If it is basic monitoring it would be free of cost. If it is for detailed monitoring, it would charge 50 cents for each metric.
While using AMI we launch instance which has monitoring enabled in it. CloudWatch will keep monitoring resources and the alarm is set. Alarm is a trigger here. For example, if CPU utilization is more than 50% it will alert the user. The threshold level for each alarm is also set. It will then notify AutoScaling. From there we can trigger certain policies which will add or remove new instances. It will then be added to load balancer and will complete the scaling activity.
CloudWatch is nothing but a repository of data. It can receive data from two sources namely AWS Products and also the Custom Data. There are scripts available which we can configure in any machine in such a way that it would capture current data and send it to CloudWatch.
For instance, if a person has a huge refrigeration plant, where multiple freezers are available, and the user wishes to be notified every time a freezer drops temperature. Here, the user can attach devices which will collect the temperature in constant interval and send the data in Amazon CloudWatch along with alarms.
The Alarm would be able to take 3 actions
Here, the user’s infrastructure was not hosted in Amazon. A point to note is that if the user kept monitoring the CPU utilization, network I/O, he would capture the data and keep sending notification to the CloudWatch. The user had set up an alarm on a condition that whenever the CPU utilization is more than 70% , it must notify through SNS (Email+ http endpoint). The http endpoint was connected to a sensor device. So whenever a message came to the sensor device, the light will be red. Apart from that we can also view the notification using the AWS Console or create a Statistical Consumer where the data can be downloaded from CloudWatch and create its own tool. Amazon CloudWatch stores data only for two weeks. If the history data is required, it should be downloaded manually.
Got a question for us? Mention them in the comments section and we will get back to you.