*AWS monitoring* is how you keep AWS systems visible predictable secure and fast by combining metrics logs tracing auditing and automation.
Here are the Core AWS monitoring services
Firstly, lets explained what Cloudwatch actually is.
*AWS CloudWatch* is Amazon Web Services native monitoring and observability service. It helps you see what is happening inside your AWS environment in real time by collecting metrics, logs, events, and traces from AWS resources and applications.
Think of CloudWatch as the eyes and ears of AWS. It tells you how your systems are performing, alerts you when something goes wrong, and helps you troubleshoot issues before users even notice.
*AWS CloudWatch*
CloudWatch is the foundation of AWS monitoring.
What CloudWatch monitors, It helps monitor
I. *Infrastructure metrics*
II. *Application logs*
III. *Events and state changes*
IV. *Alarms and automated actions*
Cloudwatch Collects metrics like *CPU, *MEMORY, **DISK*, *NETWORK****
Central log storage and search
Real time dashboards
Automated alarms and scaling actions
In Use cases it helps detect high CPU usage and automatically scale EC2 instances before users experience slowdowns.*AWS CloudTrail*
CloudTrail monitors who did what in AWS.
What CloudTrail records
I. *API calls*
II. *Console logins*
III. *Resource changes*
IV. *Identity and Access Management (IAM) activity*
Key capabilities
Audit trails for compliance
Security investigations
Change tracking
In use case it helps you find out who deleted an EC2 instance or modified a security group.
What is AWS CloudWatch
*AWS CloudWatch* is Amazon Web Services native monitoring and observability service. It helps you see what is happening inside your AWS environment in real time by collecting metrics, logs, events, and traces from AWS resources and applications.
Think of CloudWatch as the eyes and ears of AWS. It tells you how your systems are performing, alerts you when something goes wrong, and helps you troubleshoot issues before users even notice.
Core components of AWS CloudWatch
- *Metrics* Metrics are numerical data points collected at regular intervals. Examples CPU utilization of an EC2 instance Memory usage from a custom application Number of requests hitting a load balancer Latency of an API
Key facts
*Metrics* are stored by default for many AWS services
Metrics are timestamped
You can create custom metrics from your own apps
Use case
You notice CPU usage is above 80 percent for 10 minutes and performance slows down. CloudWatch shows this instantly.
*Logs*
CloudWatch Logs stores and analyzes log files from systems and applications.
Examples: Application logs, System logs,Web server access logs
Lambda execution logs
Power features: Centralized log storage, Search and filter logs, Log Insights using SQL like queries, Log retention policies
In use case if your app crashes. Instead of logging into servers, you search logs centrally and find the exact error message in seconds.*Alarms*
Alarms watch metrics and take action when thresholds are crossed.
Examples: Send an email when CPU exceeds 75 percent
Restart an EC2 instance automatically, Trigger Auto Scaling, Notify Slack via SNS
In use case at 2 AM CPU spikes. CloudWatch alarm triggers Auto Scaling and adds new instances automatically.*Dashboards*
Dashboards are visual panels showing metrics and alarms in one place.
You can Create custom dashboards,
View real time graphs
Monitor multiple services on one screen
In use case an operations dashboard showing EC2 health, database performance, API latency, and error rates all together.
In today exercise, I will demonstrate how to configure AWS monitoring, AWS cloudwatch set alarm.
First thing we have to create our EC2 instance
Login to *AWS account* https://console.aws.amazon.com
1 In the AWS search bar type *EC2* and hit enter

3 provide instance name newyearec2.

4 Select my operating system, here I chose *Amazon Linux* as OS.

5 leave all other settings on default.
6 Create key pair
- *Launch install*
- My new EC2 install is deployed successfully

9.Next thing I need to connect to my new EC2 instance
Click *Connect to instance*
- My *Amazon Linux terminal* opens
Now that I have done with EC2 deployment, I am going to configure AWS monitoring.
- In other to achieve this we need to create an *SNS topic* in AWS In the search bar type *SNS*
- After creating *SNS topic, next we need to create a *subscription** The Topic ARN is display Protocol type: The type of endpoint to subscribe to. Eg. Email Endpoint: An email address that can receive notifications from Amazon SNS.Eg. *Ramb0@gmail.com*
- In AWS console, type *CloudWatch* and hit enter
- When CloudWatch opens, click on Metrics and select all metrics, it displays numeric data of what we want to monitor including *EC2, *EBS, **SNS*, *Billing**** *S3Bucket, *Logs, **Usage**** etc.
- Select *EC2*
- We will be looking at *Per instance metrics* when we expand per instance metrics it displays every component we can monitor. In my exercise I will be monitoring CPU utilization.
Note that the name of my EC2 Instance is *newyearec2*
- Another way to achieve this, In AWS search CloudWatch Inside CloudWatch select Alarm, All alarm
- Select Metric
- Select *newyearec2* CPU utilization and select metric
- Set the *CPU threshold* Greater Than 75%
- Here I give my alarm a name. *newyearec2alarm*

And finally my alarm is configured.
- Next, we need to install a software from the terminal to test *cpu utilization*
On *EC2 Instance* click on connect
- Click on connect using a public IP
- I will *install a yum* package to stress out my CPU to send an email alert.
- After stressing my CPU, I need to check my email to confirmation the email subscription.

Here is my output. Received an email alert indicating higher CPU utilization.
This is how we monitor resource in AWS to track specific information on key component.
Hope this exercise was helpful!

































Top comments (0)