Problem:
Get famiiar with Amazon CloudWatch and use it to monitor Amazon EC2.
Solution Summary:
Amazon CloudWatch is a monitoring service for AWS cloud resources and the applications you run on AWS. Amazon CloudWatch Events delivers a near real-time stream of system events that describe changes in Amazon Web Services (AWS) resources. You can use Amazon CloudWatch Logs to monitor, store, and access your log files from EC2 instances, AWS CloudTrail, and other sources. The CloudWatch Alarms feature allows you to watch CloudWatch metrics and to receive notifications. Read more here.
Solution Steps:
Steps:
-
Get inside AWS console and go to CloudWatch.
-
Click on Metrics and explore the metrics available.
-
Click on Dashboards and then click on ‘Create Dashboard’.
-
Give a name (e.g. Buddy Overview), Select the widget type as Metric Graph, Click Configure.
-
Go to per-instance metrics under EC2 metrics section. You will find CPU, Disk, Network and Status metrics, but not Memory. Select CPU Utilization and go to next page.
-
Change few parameters for the widget (e.g. last 1 hour) and verify.
-
Add a new widget to your dashboard by clicking on ‘Add Widget’.
-
Click on Events and read the description and examples provided.
-
Click on Logs and read the description about CloudWatch logs.
-
Click on Alarms and create an alarm to email you, if cpu utilization goes beyond 50% in 1 minute. Have a look at other actions available such as Autoscaling, EC2 Action.
Recent comments