Monitoring & Auditing Flashcards
What is Cloudwatch?
A monitoring service.
Provides metrics for EVERY service in AWS
What is a cloudwatch metric?
A variable to monitor: CPUUtilization, BucketSize, etc.
What is a metric attribute?
The metric attributes are called “Dimension”.
What are cloudwatch logs?
You set up a log group, then in it a log stream, which will capture the logs.
How are logs created in cloudwatch?
Different services have the capability of creating log groups in cloudwatch.
What are metric filters?
Metric filters are a way to filter key lines in a log group stream, with the objective of creating a new metric.
You create a filter by choosing a sample log stream, and using key words to find a pattern in the events of the log stream.
What is a log stream?
A single captured log chain, that belongs to a log group. In a log stream there are multiple events that describe what happened in an aws service.
A log stream is an instance of a log capture.
How do you create a metric?
You create a metric by creating a filter with a pattern, and a value.
For example if the pattern happens x amount of times, x being the value, you would get an alarm triggered in case you tie this new metric to a cloudwatch alarm.
How are cloudwatch log groups and S3 related?
You can send the log into s3 bucket.
What is log insights?
A cloudwatch QUERY capability that lets you query log groups for streams, by using a query language. This is great to find specific data in a big log group with lots of different logs. For example ip addresses, errors, etc, etc. Everything that could be logged basically.
You can export these logs, or add them to a dashboard.
Where could cloudwatch logs be sent to?
S3 for storage,
Kinesis data streams and firehose
aws lambda as triggers
opensearch
What is cloudwatch log subscriptions?
This is to export logs in real time to other services, for analysis and processing.
Examples are lambda functions, and kinesis.
Use in combination with a subscription filter to specify which events to send from the log streams.
What is a subscription filter?
When using cloudwatch log subscriptions (for kinesis, lambda) you can set a subscription filter to only send the log events you want instead of the whole log.
How can you aggregate cloudwatch log data from multiple aws accounts into one destination?
You can create a subscription filter from each aws account into a single kinesis data stream in one of the accounts (with cloudwatch cross account subscription), and then put it in firehose for example, to store it into s3.
What is cross account subscription?
You can send cloudwatch logs to another account with kinesis data streams.
What is live tail?
Its a feature where you choose a log group, and optionally a log stream and a filter, and as events happen you see them live.
It’s like a log capture tool.
Do EC2 instances send logs to cloudwatch?
Not by default, but you can install a unified log agent to send logs to cloudwatch, if you set up iam roles in the ec2 instance correctly.
EC2 instances DO send basic METRICS to cloudwatch by default
What is cloudwatch unified agent?
the cloudwatch log agent that you can install in ec2 instances or any onpremises server to collect data to send to cloudwatch.
It collects both metrics and logs.
What are cloudwatch alarms?
For triggering notifications on a single metric.
Alarm states are: OK, INSUFFICIENT_DATA, ALARM.
You can set a period for triggering the alarm.
What are composite alarms?
Alarms in cloudwatch that are set on multiple metrics.
They work by monitoring the state of multiple other configured alarms.
It can be configured as an OR, or AND.