Domain 5: Monitoring Flashcards
What is AWS CloudWatch?
AWS CloudWatch is a monitoring/management service which provides monitoring of metrics
What is a CloudWatch alarm?
Trigger an event when a given metric is exceeded and trigger an event. E.g. an SNS notification
What are the CloudWatch EC2 default host level metrics?
CPU, Network, Disk IO & Status Check (health)
What are the CloudWatch EC2 custom metrics?
RAM utilization, remaining disk space
What is the default CloudWatch EC2 monitoring inteval?
5 minutes
What is the default CloudWatch EC2 detailed monitoring inteval?
1 minute
What is the minimum CloudWatch granularity of custom metrics?
1 minute
To create custom metrics from an EC2 instance what are some of the things you need to do?
- Attach a role with the policy CloudWatchFullAccess to the EC2 instance
- Configure the EC2 instance to write CloudWatch logs every 5 minutes (minimum 1 minute) (can use cron job)
What is AWS X-Ray?
Service collects data about requests that your application serves
Describe the X-Ray architecture
X-Ray SDK is installed on your EC2 instance which runs the X-Ray Daemon this communicates with the X-Ray API for information which can be viewed in the X-Ray Console
What services does X-Ray integrate with?
Elastic Load Balancing Lambda API G/W EC2 AWS Elastic Beanstalk DynamoDB
What does the X-Ray SDK provide?
Interceptors to add to your code to trace HTTP requests
Client handlers to instrument AWS SDK
What languages are supported with X-Ray?
Java, Go, Ruby, NodeJS, Python, .NET, C#
How to integrate ECS with X-Ray?
Run the X-Ray Daemon in it’s own Docker image running alongside your application
What is AWS CloudTrail?
Great for auditing, provides logs of
IP address of client, success or failed, which user/role
What is AWS Config?
A service that enables you to assess, audit & evaluate all your resources
Provide notifications when resources deviate from given standards
What are the CloudWatch Alarm actions available?
SNS publish, Email notification, auto scaling action or EC2 action
(To trigger other services you must subscribe to an SNS topic)
How do you set up X-Ray to work with your application?
Add x-ray instrumentation to your application code
Install the X-ray SDK on your machine
If using ECR run the X-ray daemon in a docker image
Give the necessary permissions to the EC2 or the ECS task
When is Kinesis Data Streams used?
Rapidly moving data and continuously processing the data. Great for clickstreams
When is Kinesis Firehose used?
Great for loading streaming data into data stores/analytics stores.
How long does it take for forecast-based AWS Budget alerts to be triggered?
Needs about 5 weeks of usage data to generate the forecasts.
What instance types are in the free-tier?
t2.micro or t3.micro
What is X-Ray sampling?
Modify the sampling behaviour of the amount of data that you record.
What is AWS Config used for?
Dive into resource configuration histories. E.g. what did my resource look like 2 months ago?
What are API G/W usage plans?
Specifies who can access API stages / methods.
Uses API keys to identify clients and throttle the connection.
What are organization trails?
Logs all events for all AWS accounts in that organization.
How to monitor ec2 instances from the cli?
aws ec2 monitor-instances –instances-ids xxxx
What is Amazon CloudWatch Agent?
Collects system-level metrics from EC2
What is AWS System Manager Agent?
Manages, updates & configures EC2 resources
How to monitor API G/W?
API Gateway Access logs with CloudWatch
Is log group data encrypted in CloudWatch logs?
Yes
How to set encryption using kms with CloudWatch log groups?
aws logs associate-kms-key
How can CodePipeline trigger a build?
Either when an update is made to CodeCommit or a change to an S3 bucket
What are X-Ray Annotations?
key-value pairs that are indexed for searching through the trace data.