Module 7 - Monitoring and Scaling Flashcards
(40 cards)
What are some options for monitoring on AWS?
CloudTrail
CloudWatch
EventBridge
Why do you need to monitor?
Operational Health
Application performance
Resource utilization
Security auditing
What is CloudWatch?
A service that provides a near real-time stream of system events. Sends notifications or automatically makes changes to the resources you are monitoring based on rules that you define. Also works for on-prem servers. It’s a metrics repository.
What statistic types does CloudWatch offer?
minimum, maximum, sum, average, count, and percentile.
What do CloudWatch alarms do?
Alarms can be configured to trigger actions to stop, start, or terminate a service when certain criteria are met.
What types of logs are there?
CloudTrail - user activity, API usage. who did what and when
CloudWatch logs - apps, log files from EC2, CloudTrail, Route53.
VPC FLow logs - IP traffic to/from network interfaces in the VPC
Custom
What is a log stream?
a sequence of log events that share the same source. Each separate source of logs in CloudWatch Logs makes up a separate log stream.
What is a log group?
a group of log streams that share the same retention, monitoring, and access control settings. You can define log groups and specify which streams to put into each group
What is a metric filter?
A way to search for and match terms, phrases, or values in your log events. When a metric filter finds one of the terms, phrases, or values in your log events, you can increment the value of a CloudWatch metric
Where are CloudTrail logs stored?
S3 bucket.
Where can you see the VPC Flow logs?
Amazon EC2 and Amazon VPC consoles.
Logs are stored in S3 bucket or CloudWatch log groups.
What triggers do VPC Flow logs offer?
You can create alarms that will fire if certain types of traffic are detected, and metrics to help you to identify trends and patterns
What logging is NOT captured in VPC FLow logs?
VPC logging does not include:
• DNS traffic
•DHCP traffic
• Windows license activation traffic
• traffic to and from the instance metadata address
(169.254.169.254)
•Traffic to/from the reserved IP address of the default VPC router
What entities can you create a VPC FLow log for?
You can create a flow log for a VPC, a subnet, or an elastic network interface.
If you create a flow log for a subnet or VPC, each network interface in the VPC or subnet is monitored.
Where can you publish VPC FLow logs?
You can publish flow log data to a log group in CloudWatch Logs. OR to S3 bucket in log file objects.
You can’t edit the configuration of a log after you create it, you can only delete it.
What happens if the same network interface is present in one or more flow logs in the same log group?
it will have one combined log stream
How does VPC Flow Logs publish to S3?
In 5 minute intervals. If a file is over 75MB it stops adding logs to the file, publishes to S3, then creates a new file.
What does the user creating the flow logs need to have?
They must either own the bucket or have GetBucketPolicy and PutBucketPolicy permissions.
What is CloudWatch?
A metrics alarm. Whenever the metric reaches some threshold, an action occurs (EC2 action, autoscaling, or notification to a topic).
What are the 3 alarm states?`
- OK: The metric is within the defined threshold.
- ALARM: The metric is outside the defined threshold.
- INSUFFICIENT_DATA: The alarm has started, the metric is not available, or not enough data is available for the metric to determine the alarm state.
What is a namespace in CloudWatch?
A container for metrics. You specify the namespace when you create metrics so you keep your applications separate.
Naming convention: AWS/
What is a CloudWatch metric?
A metric represents a time-ordered set of data points that are published to CloudWatch. Always associated with a timestamp.
What is a dimension in CloudWatch?
A dimension is a name-value pair that uniquely identifies a metric (up to 10 per metric).
What are valid time periods in a CloudWatch statistic?
Valid values for a period are 1, 5, 10, 30, or any multiple of 60.