❄️ AWS CloudWatch
CloudWatch collects monitoring and operational data in the form of logs, metrics, and events, and visualizes it using automated dashboards so you can get a unified view of your AWS resources, applications, and services that run on AWS and on premises.
⚜️Why AWS CloudWatch?
Amazon CloudWatch is the component of Amazon Web Services that provides real-time monitoring of AWS resources and customer applications running on Amazon infrastructure.
The following image shows the different AWS resources monitored by Amazon CloudWatch.
Configure Amazon CloudWatch to send a notification when CPU utilization of an instance is greater than 1%.
👉Step 1 : Creating a CPU utilization metric
Go to Amazon CloudWatch Management Console and select metrics from the navigation pane.
👉Step 2 : Click on Metrics — All metrics.
Click on Graphed metrics.
👉Step 3: Click on Add metrics using browse or query.
Click EC2 -View automatic dashboard
👉Step 4: Creating an alarm to notify when CPU Utilization metric of the instance is greater than 1%.
- Now select the Graphed Metrics option on the same page. Then set the time period according to your need. And choose an alarm icon located beside the selected instance.
Then create a Alarm.
Create new topic if you don’t have any existing topics.
If you want to Autoscaling according to CPU utilization.
Click Add Auto Scaling Action.
👉Step 6: Give your alarm a name and description. Set the Threshold condition.
You want AWS to send you an email notification whenever the alarm condition is satisfied. The notification is sent through Amazon SNS Topic.
👉Step 8: Congratulations, you have successfully configured Amazon CloudWatch Alarm to monitor your instance. You will receive the notification through an e-mail on the mail-id you have specified when the alarm condition is met.
🔅Use Case 2: You can log the changes in the state of an Amazon EC2 instance by using CloudWatch Events with the assistance of AWS Lambda function.
Benefits of Amazon CloudWatch
- Amazon CloudWatch allows you to access all your data from a single platform. It is natively integrated with more than 70 AWS services.
- Provides real-time insights so that you can optimize operational costs and AWS resources.
THANK YOU !!