Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • DSA
  • Practice Problems
  • C
  • C++
  • Java
  • Python
  • JavaScript
  • Data Science
  • Machine Learning
  • Courses
  • Linux
  • DevOps
  • SQL
  • Web Development
  • System Design
  • Aptitude
  • GfG Premium
Open In App
Next Article:
How to setup a Cloud Watch
Next article icon

How to setup a Cloud Watch

Last Updated : 16 Oct, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

Amazon CloudWatch a key component of Amazon Web Services (AWS) is a service for real-time monitoring. Designed to empower users with vital data and actionable insights. It facilitates the continuous monitoring of applications, and performance adjustments across systems. It collects operational data in the form of logs, metrics and events. It also offers users a perspective on AWS resources, applications, and services operating within the AWS environment.

Table of Content

  • Components Of Cloud Watch
  • Installing and Configuring AWS CloudWatch Agent on EC2 Instances Using AWS CLI
  • How To Setup AWS Cloud Watch
  • AWS Configuration for CloudWatch Logs
  • How to Setup AWS CloudWatch Alarms
  • Conclusion
  • Frequently Asked Questions (FAQs) On Cloud Watch

Components Of Cloud Watch

  • EC2 (Elastic Compute Cloud): Before starting with CloudWatch we must know what is EC2 It is the Amazon Web Service we use to create and run virtual machines in the cloud (we call these virtual machines 'instances').To set CloudWatch we must have one EC2 instance running on your machine. If you don't know how to launch an EC2 instance you can refer to this article.
  • Resource Groups: AWS Resource Groups lets us organize all the resources such as EC2 instances, RDS database, and S3 buckets into groups using tags that we define while launching/creating instances services. It is a collection of resources that match the resource types specified in a query, and share one or more tags or portions of tags.
  • Cloudwatch Logs: CloudWatch Logs allows us to see all of our logs, regardless of their source, as a single and consistent flow of events ordered by time with the help of Graphs.
  • Cloudwatch Alarms: CloudWatch Alarms allow us to set different types of alarms which notify us if any Matric goes above the threshold (will be set while creating an alarm).

Installing and Configuring AWS CloudWatch Agent on EC2 Instances Using AWS CLI

For detailed steps and best practices on installing and configuring the AWS CloudWatch agent on EC2 instances using the AWS CLI please refer to our comprehensive guide on Installing and Configuring AWS CloudWatch Agent on EC2 Instances Using AWS CL

Installing AWS CloudWatch Agent on EC2Instances

How To Setup AWS Cloud Watch

In this architecture we illustrate the essential components involved in setting up AWS CloudWatch for monitoring and alerting your AWS resources effectively The architecture for setting up AWS CloudWatch starts with the user accessing the AWS Management Console. From there, the user can manage various AWS services, including CloudWatch, to monitor their resources effectively. In this setup an Amazon EC2 instance acts as the primary resource being monitored. This instance continuously generates performance metrics such as CPU utilization and network traffic which are then sent to CloudWatch.

Aws cloud watch setup


Step 1: Go to https://aws.amazon.com/ and Sign in.

Step 2: In the Search Bar, search for EC2 as shown below.

EC2 Search
EC2

Step 3: After clicking on EC2 from search bar you will land on EC2 dashboard where all the stuff about EC2 is displayed. Click on Instances.

EC2 Instances
EC2 Dashboard

Step 4: Here you will get all the EC2 which are running, stopped, terminated, etc. Select the one you want to use. Make sure its Running.

EC2 Instances
Select Running EC2 Instance

Step 5: Go to to tags section where you will found Key-Value pair, note this down somewhere.

Key-Value Pair
Go to Tags

Step 6: Again go to search bar, search for Resource Groups.

Resource Groups
Resource Groups

Step 7: After landing in Resource Groups page, from left side select Create Resource Group. In group type select EC2:Instance.

Create Resource Group
Search EC2 Instance

Step 8: Scroll down you will find Tags section here, select you Key-Value of your EC2 in this tags and select them. You can also select multiple tags if you want.

Create Query-based Group
Select Tag

Step 9: Scroll down more, name your resource group and hit Create Group.

Create Group
Group Name

Step 10: If you get message something like shown in image below then you successfully created Resource Group.

Create Resource Group
Create Group

Step 11: Now go to search bar and search for Cloudwatch.

CloudWatch
Cloudwatch

Step 12: Select filter from 'Filter by resource group' and select your Resource Group which we made earlier.

Filter By Resource Group
Filter by Group

Step 13: Scroll down and click on 'View EC2 dashboard' and you will get all the necessary graphs.

View EC2 Dashboard
Graphs

AWS Configuration for CloudWatch Logs

For a comprehensive guide on configuring CloudWatch logs in AWS please refer to our detailed article on AWS Configuration for CloudWatch Logs.

How to Setup AWS CloudWatch Alarms

Step 14: On the left menu got Alarms > All alarms > Create alarm > Select metric. Now select EC2 as were setting alarm for EC2 instance.

Creating Alarm

Step 15: Select Pre-Instance Metric and now select where Metric Name is CPU Utilization.

Pre-Instance Metric
Metric Name

Step 16: Scroll down and set threshold according to your needs. Click Next

Conditions setup
Threshold

Step 17: In Notification, Create a New Topic. Enter Topic name and your Email address. Create and Next.

Creating a new Topic
Create Topic

Step 18: Set preferred Alarm name, Next > Create Alarm.

Create Alarm
Alarm Created

Step 19: If you get notification for Pending Cornfirmation, confirm subscription from your mail.

Step 20: After confirming subscription confirm from SNS subscription page.

Conclusion

We have seen how to setup Cloudwatch using EC2 instance and Resource Groups. We have also seen how to set alarm for your EC2 instance to get notification on your mails for CPU Utilization.


Next Article
How to setup a Cloud Watch

G

gaurav7165
Improve
Article Tags :
  • Cloud Computing
  • Geeks Premier League 2023

Similar Reads

    How to Install CloudPanel on Ubuntu?
    CloudPanel can be self-hosted on Ubuntu and is a very effective software for the administration of web hosting platforms. CloudPanel is a type of open-source control panel that primarily facilitates the tasks of an administrator and developers and that is used by hosting providers as well. This guid
    3 min read
    How To Setup Kafka on GCP ?
    Setting up Apache Kafka on the Google Cloud Stage (GCP) includes a few steps, including making a GCP project, designing organization and firewall settings, provisioning virtual machines (VMs), and installing and designing Kafka. This guide will take you through the whole process step by step.Prerequ
    5 min read
    How To Setup Kafka on AWS ?
    Apache Kafka is a strong distributed event framework known for its high output, it also protects from internal failure. Setting up Kafka on AWS (Amazon Web Services) allows you to use the cloud framework for dependable messaging and continuous data handling and processing. this article will walk you
    7 min read
    How To Setup Amazon Web Service (AWS) ECS?
    Amazon ECS is a popular Cloud Computing service that is used for more efficient cloud-based container management. Amazon ECS makes it easier to build apps without being limited by physical hardware resources. In this article, we will guide you through setting up and running the ECS service and show
    7 min read
    IoT and Cloud Computing
    One component that improves the success of the Internet of Things is Cloud Computing. Cloud computing enables users to perform computing tasks using services provided over the Internet. The use of the Internet of Things in conjunction with cloud technologies has become a kind of catalyst: the Intern
    6 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences