Open In App

Introduction to Amazon Cloudwatch

Amazon CloudWatch is a service used for monitoring and observing resources in real-time, built for DevOps engineers, developers, site reliability engineers (SREs), and IT managers. CloudWatch provides users with data and actionable insights to monitor their respective applications, stimulate system-wide performance changes, and optimize resource utilization. CloudWatch collects monitoring and operational data in the form of logs, metrics, and events, providing its users with an aggregated view of AWS resources, applications, and services that run on AWS. The CloudWatch can also be used to detect anomalous behavior in the environments, set warnings and alarms, visualize logs and metrics side by side, take automated actions, and troubleshoot issues.

Amazon CloudWatch Agent

Amazon Cloudwatch is an open-source lightweight tool that is used to collect the data of the resources in which they are deployed. Some of the data is as follows



Why Amazon CloudWatch?

Amazon Cloud Watch is a monitoring service offered by Amazon Web Services to monitor applications like the following.

You can set the alarm to the to the resource use of the applications when the limits are exceeded then you will get the notification to the mail automatically.



How Amazon CloudWatch Works

At first Amazon Cloud watch will configured to the resource that you want to monitor from there the agents that are configured will be used to collect the logs from the resources the service may be run on-premises or AWS. Cloudwatch also provides the overall view of the resources with the help of a dashboard from where you can troubleshoot the issues. Cloud watCloudwatchh also performs the operational changes depending on the changes made to the resources they will also perform the AWS auto-scaling of the resources depending on the changes that occurred. Cloudwatch performs real-time analysis based on the logs that have been received.

Amazon CloudWatch Features

Metrics

Dimensions

Statistics

Alarm

Percentiles

Cloudwatch dashboard

Cloudwatch agent

Cloudwatch Events

Cloudwatch logs

Getting started with Amazon CloudWatch

Notifying gfg website management team when the instance on which gfg website is hosted stops Whenever the CPU utilization of instance (on which GeeksForGeeks website is hosted ) goes above 80%, cloudwatch event is triggered. This cloudwatch event then activates the SNS topic which sends the alert email to the attached gfg subscribers.

Create an SNS Topic

Step 1: Let us assume that you have already launched an instance with the name tag ‘instance’. 

Step 2: Go to SNS topic dashboard and click on create a topic

Step 3: You will be directed to this dashboard. Now specify the name and display name.

Step 4: Scroll down and click on create the topic.

Step 5: The SNS topic is created successfully. 

Add Subscribers

Step 1: Go to the SNS topic dashboard and click on gfgtopic link.

Step 2: Under the subscriptions section, Click on Create subscription.

Step 3: Select Email as protocol and specify the email address of subscribers in Endpoint. Click on create the subscription. Now Go to the mailbox of the specified email id and click on Subscription confirmed.

Craft the CloudWatch Alarm

Step 1: Go to the cloudwatch dashboard on the AWS management console. Click on Metrics in the left pane.

Step 2: In All metrics section click on EC2 

Step 3: Click on Per-instance metrics

Step 4: Select the instance you launched

Step 5: Go to Graphed metrics, click on the bell icon

Step 6: This dashboard shows the components of Amazon Cloudwatch such as Namespace, Metric Name, Statistics, etc

Set the Threshold

Step 1: Select the greater threshold. Also, specify the amount( i.e 80 ) of the threshold value. Click on Next.

Connect the Dots

Step 1: Click on Select an existing SNS topic, also mention the name of the SNS topic you created now.

Step 2: Specify the name of alarm and description which is completely optional. Click on Next and then click on Create alarm.

Monitor Your Instances Using CloudWatch

Step 3: The alarm is successfully created.

Step 4: You can see the graph which notifies whenever CPU utilization goes above 80%.

 Use Cases for CloudWatch

Benefits of Amazon Cloudwatch

Draw Backs of Amazon Cloudwatch

Amazon CloudWatch Pricing

Amzon cloud watch offers different pricing as following.

Free Tier

Amazon cloud watch offers free tier up to 7 metrics, 3 alarms and 500 custom dashboards per month and log storage up to 5 Gb per month.

Pay-as-you-go

You will be charged according to the base charge like each metric had its base charge and log will be charged based on per gb for dashboard you will be charged according to the per dash board. You will basically charged according to how much you use.

FAQs On Amazon Cloud Watch

1. Amazon Cloudwatch Events

Amazon Web Services (AWS) offers a tool called Amazon CloudWatch Events that lets you react to changes in your AWS resources.

2. Difference Between CloudWatch and CloudWatch Trail

  • AWS CloudWatch: AWS CloudWatch is used for the monitoring and management service provided by the AWS.
  • AWS CloudWatch Trail: AWS Cloud Trail will service that provides a record of actions taken by a user, role, or an AWS service in your AWS account.

3. Is Cloud Watch an AWS Service

It’s true that Amazon CloudWatch is an AWS service. Amazon Web Services (AWS) offers a comprehensive monitoring and observability service called Amazon CloudWatch.

4. What Type of Monitoring Can Amazon CloudWatch be Used For?

Following are the some types monitoring amazon CloudWatch offers.

  • Infrastructure Monitoring.
  • Application Monitoring.
  • Resource Monitoring.


Article Tags :