How to create alarm in AWS CloudWatch
Amazon cloudWatch helps you to monitors your web application which is running on AWS in real-time. With this we can collect and track information of the application.
We can track one hour, 3 hours, one Day, 1 week custom
1. First Go to services tab click on cloudwatch under Management Tools. Then clik on create dashborad give any name to your dashboard.
2. Then you will get some options click Compare metrics over time, then hit the button Widget configure.
4. Over here you will get all the matrics, select carfully your instance. Matrics name sould be CPUUtilization then click create widget.
5. We are going to add one more widget, click on add widget select Compare metrics over time and then click on configure. Again select EC2 and the click on Per-Instance Metrics over there select your instance id with matrics name network In and network out. Then clik create widget.
Set alarms-
1. Now we are going to set alarm, click create alarm after that you will get pop up page select Per-Instance Metrics. Select your instance choose CPUUtilization & Metrics next click on Next button.
2. Give name to your alarm, choose the condition inside CPUUtilization If you choose <= 50. Which means if your CPU utilization is less then 50 % then this alarm will fire and stop the instance. If you choose stop the EC2 instance inside the EC2 action. Then last step is to hit create alarms button.
3. If everything goes right,your EC2 instance will be stop after 5 min.
What is amazon cloudWatch and how create alaram
No comments:
Post a Comment