0% found this document useful (0 votes)
12 views

cw and ct

Uploaded by

Rohan Ashish
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

cw and ct

Uploaded by

Rohan Ashish
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

1. What is cloudwatch?

AWS CloudWatch is a monitoring tool for tracking AWS application

health and resource use. It's commonly used to help:

 Monitor and fix operational issues


 Measure and optimize performance through logging
 Monitor AWS applications on-premises or in the cloud
 Troubleshoot AWS infrastructure, and more

2. What is cloudtrail?

AWS CloudTrail is an auditing, compliance monitoring, and governance tool from Amazon Web
Services (AWS). It’s classed as a “Management and Governance” toola in the AWS console.

With CloudTrail, AWS account owners can ensure every API call made to every resource in their
AWS account is recorded and written to a log. An API call can be made:

 when a resource is accessed from the AWS console


 when someone runs an AWS CLI command
 when a REST API call is made to an AWS resource

These actions can be coming from:

 Human users (e.g. when someone spins-up an EC2 instance from the console)
 Applications (e.g. when a bash script calls an AWS CLI command)
 another AWS service (e.g. when a Lambda function writes to an S3 bucket)

CloudTrail saves the API events in a secured, immutable format which can be used for later
analysis.

3. Difference between cw n ct?

There are two prevalent AWS logging and monitoring services: CloudTrail
and CloudWatch. CloudWatch monitors AWS resources, while CloudTrail
monitors actions in the AWS environment. Despite the considerable
differences between them, integrating CloudWatch and CloudTrail allows us
to better manage our AWS environments. For example, you can send
notifications using the Amazon Simple Notification Service ( SNS) whenever
an authorization failure occurs in your AWS account.
This article will provide a deeper look into both CloudTrail and CloudWatch.
We will also explore how these services can complement each other to
provide finer control over your AWS infrastructure.

The table below provides a formal definition of AWS CloudWatch and AWS
CloudTrail and describes their basic features. In-depth discussions of AWS
CloudTrail and AWS CloudWatch and techniques for their use as an
integrated service are provided later in this article.

Parameters AWS CloudWatch AWS CloudTrail


CloudWatch is a monitoring service CloudTrail is a web service that records API
Definition
for AWS resources and applications. activity in your AWS account.
Monitoring CloudWatch monitors applications and CloudTrail monitors actions in the AWS
Parameters AWS CloudWatch AWS CloudTrail
infrastructure performance in the AWS
Tool environment.
environment.
CloudTrail answers these questions:Who made
a request?Which services were used?What
With CloudWatch, we can:Collect and
actions were performed?What were the
Usage track metricsCollect and monitor log
parameters for those actions?What were the
filesSet alarms and visualize
response elements returned by the AWS
service?
CloudWatch delivers metrics data in 5-
minute or 1-minute periods for
essential monitoring and detailed
Logs or Event CloudTrail delivers an event within 15
monitoring, respectively.By default,
delivery Rate minutes of the API call.
log data will be sent by the
CloudWatch Logs agent every five
seconds.
Suppose you have a web app running
If your EC2 instance’s security is
in your AWS environment; AWS
compromised by an attacker, you can identify
Example CloudWatch can monitor bandwidth
the culprit with the help of historical
utilization, performance, and the traffic
CloudTrail data Logs.
parameters of your app.
EC2 instances, autoscaling, load
Integration balancers, AWS SNS, SQS, AWS AWS CloudWatch, AWS ElasticSearch, AWS
with Other RDS, AWS S3, AWS DynamoDB, Lambda, third-party monitoring platforms,
Services AWS CloudTrail, other AWS AWS SNS, AWS, SQS, etc.
resources.

4. cw rull::schedule n event

5. How to create dashboard?

6. create alarm depends on threshold.

7. What is cw agent? Why do we need CloudWatch agent?

CloudWatch agent allows you to collect more system-level metrics from your EC2 and on-
premises servers than just the standard CloudWatch metrics. It also enables you to retrieve
custom metrics from your applications or services using the StatsD and collectd protocols.

8. Why install cw agent on ec2?

Why do we need CloudWatch agent?


CloudWatch agent allows you to collect more system-level metrics from your EC2 and on-
premises servers than just the standard CloudWatch metrics. It also enables you to retrieve
custom metrics from your applications or services using the StatsD and collectd protocols.

9. How to check cw log?

10. How to check CT log?

Default Monitoring(Basic) :5 min interval (free)


Detail Monitoring(Advance):1 min interval (paid)

Threshold-->alarm-->action-->SNS,AS,Lambda,Ansible...

Threshold:cpu utility (70%) --> action --> email by SNS

---------------------------------------------------------

How to set dashboard and create Threshold based alarm

=====================================================

start cloudwatch-->click on metriks-->search all metrics

of your ec2 using id of the instance

LAB:: other than rule and schedule


Create Dashboard,

create alarm on threshold ,

create custom metrics ,

install cw agent on ec2 or on-prem pc

You might also like