Monitoring Flashcards

1
Q

What is CloudWatch Metrics ? What are some of it’s attributes ?

A
  1. CloudWatch provides metrics for every service in AWS
  2. Metric is a variable to monitor, for example CPU Utilization
  3. Dimension is an attribute of metric (upto 30 dimensions per metric)
  4. Metrics have timestamps
  5. Can create CloudWatch dashboards for a metric
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does detailed monitoring for EC2 instances works ?

A
  1. By default EC2 instances have metrics every 5 minutes
  2. But if we enable detailed monitoring, we can get EC2 metrics every 1 minute
  3. However EC2 memory usage metrics is not pushed by default, we need to push it from inside our EC2 instances as a custom metrics.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are CloudWatch Custom metrics ?

A
  1. Usually metrics are pre defined and pushed by AWS Services by default
  2. However it’s possible to define our own custom metrics and push it to CloudWatch (Using API called PutMetricsData)
    3.We can define the Metric resolution (using StorageResolution metric parameter)
  3. Standard - 1 Minute (60 seconds)
  4. High Resolution - 1/5/10/30 seconds - Higher cost
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Is it possible to push CloudWatch Custom metrics in past or in future ?

A

Yes it is possible to push custom metrics 2 weeks in the past and 2 hours in the future, CloudWatch wont throw an error

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

How do we configure CloudWatch logs ?

A
  1. We need to first define CloudWatch logs which can be the application name
  2. Then we define CloudWatch streams which could be file or container name
  3. We then define the log expiration policy
  4. CloudWatch logs can send logs to S3, Kinesis Data Streams & Firehose, Lambda and OpenSearch
  5. Logs are encrypted by default
  6. Can setup KMS based encryption using our own keys
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which services send logs to AWS CloudWatch ?

A
  1. SDK, CloudWatch Logs and Unified Agent
  2. Elastic BeanStalk
  3. ECS
  4. AWS Lambda
  5. VPC specific Gateway
  6. CloudTrail
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How to search and analyze log data stored in CloudWatch logs ?

A

Using CloudWatch log insights

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

How can we send CloudWatch logs to Kinesis Data Streams, Kinesis Data Firehose or Lambda and how to only send logs which we want to and not all the logs?

A

We can use CloudWatch logs subscription to send the data to KDS, KDF & Lambda. We can use CloudWatch subscription filter to filter out logs which we want to send across

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

How and where do we export data from CloudWatch logs ?

A

We can export data from CloudWatch logs to Amazon S3 using an API called CreateExportTask

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

How do we send logs from EC2 instance to CloudWatch ?

A
  1. Agent is a small linux program that will be running on our EC2 instances, both on AWS and on-premise servers
  2. By default logs wont go from EC2 to CloudWatch.
  3. We can use CloudWatch Agent or Unified Agent to send logs from EC2 instances to CloudWatch.
  4. Unified Agent is better because it can send both logs and system level metrics to CloudWatch.
  5. Agent can send metrics such as CPU, Disk Metrics, RAM, Netstat, Processes, Swap Space etc
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is CloudWatch Logs Metric filter ?

A

We can create filter on our CloudWatch logs using a filter expression to create metrics for example how many times the word ERROR appeared in the logs. We can then use this Metrics filter to raise CloudWatch alarms.

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

What are CloudWatch Alarms ? What are different options, states and periods of a Metrics alarm ?

A

Alarms are used to trigger notifications for any metrics.
1. Options - There are various options available such as sampling, max, min etc to help define when to trigger an alarm.
2. Three states - OK, INSUFFICIENT_DATA & ALARM
3. Period - Length in time in seconds to evaluate the metrics

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

What are three main targets of a CloudWatch alarm?

A

3 main targets of a CloudWatch alarm are
1. EC2 instances - Stopping, terminating, rebooting or recovering an instance
2. Trigger an auto scaling instance
3. Send notifications to a SNS topic

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

What are CloudWatch Composite alarms ?

A

Composite alarms are used to monitor states of multiple alarms and then evaluate the outcome using AND/OR conditions.

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

What is CloudWatch Synthetics Canary ?

A
  1. Synthetics Canary are configurable script used to monitor our APIs, URLs, websites etc
  2. Programmatically reproduce beforehand what our customers do to find issues before our customers discover them
  3. Check the availability and latency of our endpoints and store load data as well as UI screenshots
  4. Integrated with CloudWatch alarms
  5. Scripts written in Node.js and Python
  6. Can run once or on regular schedule
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is Amazon EventBridge and what it’s used for ?

A

EventBridge is used to handle events. Usage:
1. Schedule CRON jobs
2. React to an event like user login etc. Such events are sent to an EventBridge and then can be transformed into a JSON message and then sent to multiple destinations like Lambda, SQS, SNS etc
3. Trigger Lambda functions or send SQS/SNS notifications

17
Q

What is EventBridge Schema Registry ?

A

Schema Registry allows us to generate code for our application so that we know in advance how data is structured in the event bus

18
Q

Why do we use Amazon X-Ray ? What are some of it’s advantages

A

X-Ray provides a visual representation of our application.
1. Used in troubleshooting performance
2. Understand dependency in micro-services
3. Pinpoint service issues
4. Review request behavior
5. Find errors and exceptions
6. Where is the request throttled
7. Identify users that are impacted