Wednesday, August 14, 2019

What is CloudWatch in AWS?


Amazon CloudWatch monitors your Amazon Web Services (AWS) resources and the applications you run on AWS in real time. 

You can use CloudWatch to collect and track metrics, which are variables you can measure for your resources and applications.

The CloudWatch home page automatically displays metrics about every AWS service you use. You can additionally create custom dashboards to display metrics about your custom applications, and display custom collections of metrics that you choose.

You can create alarms which watch metrics and send notifications or automatically make changes to the resources you are monitoring when a threshold is breached.

For example, you can monitor the CPU usage and disk reads and writes of your Amazon EC2 instances and then use this data to determine whether you should launch additional instances to handle increased load. 

You can also use this data to stop under-used instances to save money.
With CloudWatch, you gain system-wide visibility into resource utilization, application performance, and operational health.


Following are the terms associated with CloudWatch:

  • Dashboards: CloudWatch is used to create dashboards to show what is happening with your AWS environment.
  • Alarms: It allows you to set alarms to notify you whenever a particular threshold is hit.
  • Logs: CloudWatch logs help you to aggregate, monitor, and store logs.
  • Events: CloudWatch help you to respond to state changes to your AWS resources.

Creating a Dashboard

  • Sign in to the AWS Management Console.
  • I created an EC2 instance, and the name of an EC2 instance is EC2instance.
CloudWatch EC2
  • Move to the CloudWatch service.
CloudWatch EC2
  • Click on the Dashboards appearing on the left side of the console.
CloudWatch EC2
  • Click on the Create dashboard button. Enter the dashboard name. Suppose I write the dashboard name as WebServer.
CloudWatch EC2
  • Click on the Create dashboard.
  • Select the widget type and add to the dashboard.
  • I add the Line widget to our dashboard.
CloudWatch EC2
  • After adding a line widget, you have to choose the service. I choose the EC2 service.
CloudWatch EC2
  • Click on the per-instance metrics.
CloudWatch EC2
  • Choose the CPUUtilization as a metric name and click on the create widget button.
CloudWatch EC2
  • The below screen shows the CPU utilization in the form of line widget.
CloudWatch EC2
  • I add another widget known as stacked area.
CloudWatch EC2
The above screen shows the CPU utilization in the form of a colored graph.

Creating an Alarm

  • Click on the Alarms appearing on the left side of the console.
CloudWatch EC2
  • Click on the Create Alarm.
CloudWatch EC2
  • Select a metric.
CloudWatch EC2
  • select an EC2.I
CloudWatch EC2
  • Click on the Per-Instance Metrics.
CloudWatch EC2
  • I select a CPUUtilization metric.
CloudWatch EC2
CloudWatch EC2
  • Enter the Alarm details.
CloudWatch EC2
CloudWatch EC2
The above details show that when CPU utilization is greater than 80%, then an alarm is triggered and sent to the email address that you mentioned while filling the alarm details.
  • Click on the link sent to your email address for confirmation and this confirmation shows that you are ready to receive the alerts.
CloudWatch EC2


No comments:

Post a Comment

Lab 09: Publish and subscribe to Event Grid events

  Microsoft Azure user interface Given the dynamic nature of Microsoft cloud tools, you might experience Azure UI changes that occur after t...