Monitoring & Audit: CloudWatch, X-Ray, and CloudTrail Flashcards

(17 cards)

1
Q

What are the main uses for the following 3 services?
1. CloudWatch
2. X-Ray
3. CloudTrail

A

CloudWatch - Metrics, Logs, Events, and alarms
X-Ray - Troubleshooting perofrmance and errors
CloudTrail - Monitoring of API calls and auditing changes to AWS resources

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a CloudWatch metric?
What do CloudWatch metrics belong to?
What does is a Dimension in respect to a metric?

A
  • It is a variable to monitor
  • Metrics belong to a namespace
  • A dimension is an attribute of a metric (like instance id, environment)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which API call can you use to create a CloudWatch custom metric?

A

PutMetricData and define dimensions and metric resolution (StorageResolution)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What timespan will CloudWatch accept metrics from?

A

2 weeks in the past and 2 hours in the future.

Note: You should check your ec2 instance time to make sure its correct

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Answer the following about CloudWatch logs:
1. What is a Log group
2. What is a Log stream
3. Where can Logs be sent to?

A
  1. Typically represents an application logs belong to
  2. Instances within the application
  3. They can be sent to s3, data streams, data firehose, aws lambda
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Suppose you want to stream CloudWatch logs into an AWS service, when would you use each of the following AWS services?
1. Lambda
2. Kinesis Data Firehose
3. Kinesis Data Streams

A
  1. Sending realtime data to Open Search Service
  2. Sending near realtime data to S3 or Open Search Service
    3.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How would you aggregate CloudWatch logs from multiple accounts and regions?

A

Stream data from multiple CloudWatch logs into Kinesis Data Streams and then into Kinesis Data Firehose which exports to Amazzon S3

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What must you configured to send logs from EC2 to CloudWatch?

A
  1. Run a CloudWatch agent on EC2
  2. Make sure IAM permissions are correct
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the difference between CloudWatch Logs Agent and CloudWatch Unified Agent?

A

CloudWatch Logs Agent - Only used for logs
CloudWatch Unified Agent - Can send metrics and logs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Do CloudWatch Metric Filters retroactively filter data?

A

No! Filters only publish the metric data points for events that happen after the filter was created

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the 3 states for a CloudWatch alarm?

A
  1. OK
  2. INSUFFICIENT_DATA
  3. ALARM
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are the 3 main CloudWatch alarm targets?

A
  1. Stop, Teriminate, Reboot, or Recover an EC2 instance
  2. Triger an ASG action
  3. Send a notification to SNS
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How can you create a metric that alerts based on multiple other CloudWatch alarms?

A

Use composite alarms with AND or OR conditions on other alarms

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What statuses of an EC2 instance might you monitor in CloudWatch?

A
  1. Instance status (EC2 VM)
  2. System status (underlying hardward)
  3. Attached EBS status (attached EBS volumes)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Suppose you want to trigger a CloudWatch alarm based on recieving too many logs containing the string “Error”, how would you achieve this?

A

Create a CloudWatch metric filter that checks the log contains the string, and then a CloudWatch alarm ontop of this metric filter.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is CloudWatch Synthetics Canary?

A

Allows you to programmatically test what users may do on your application using Canary Blueprints