AWS CloudWatch Flashcards
What is an AWS CloudWatch Metric?
Is a time-ordered set of data points
I have a custom application, can I publish a custom Metric to CloudWatch?
Yes, you can use the CLI or API.
How long is data available in a Matric?
15 months before it is overwritten
Can you send historical matric data to cloud watch?
Yes, you can send up to 2 weeks of historical data.
If you do not provide a time stamp for a matric data point what will happen?
Cloud watch will add a timestamp based on DateTime received.
What happens to data points less than 60 seconds?
They are available for 3hrs after this they are aggregated for long-term storage as a Statistic.
What happens to data points of equal to 60 seconds?
They are available for 15 days and then aggregated for long-term storage.
What is a CloudWatch dimension?
Is a key-value pair that identifies the matric, you can have up to 10 dimensions on a Metric.
How many dimensions can I have?
Up to 10.
What is a cloud watch namespace?
A namespace is a container for matric’s.
Are cloudwatch namespaces isolated from each other?
Yes, AWS/EC2 is seperate from AWS/VPC
Can i have 11 dimentions for a matric?
No there is a limit of up to 10.
What is a namespace used for?
It holds one or more matric from a common source such as AWS/S3 or AWS/EC2.
What is a statistic?
Statistics are the metric data points aggrigations over a time period. This happens to data that is of high resolution, below 60 seconds after 3hrs data is aggregated into a statistic.
What will a stastic look like?
Minium, Maxum, Sum, Average, SampleCount
Has a stat a unit of measure and what is it used for?
A stat unit of measure temms the data wnat is is, for example seconds, bytes, count, present.
What is a CloudWatch metric statistic period?
It is the period of time the statistic represents.
Are cloud watch metric stat period defined in seconds?
Yes periods are defiend in seconds, 360 is six minutes.
Are aggrigated cloud watch metric stat be available when now using detailed monitoring?
No dfatiled stats are only available when using detailed monitoring.
Can a CloudWatch metric statistic aggregate across regions?
No, data for the statistic comes from the region the statistic is being produced in.
CloudWatch has a number of different functions, what are they?
Collect process, store and graphic metric from AWS systems. Also collect, process and store log files, dashboards, alarms and events.
Cathy recently joined Concerto, she been set up on the corporate AWS account with no access to any AWS resources, Cathy needs read-only access to CloudWacth, how can I do this?
Create an inline policy for Cathy with read-only privileges to CloudWatch or add Cathy to an existing IAM group with read-only privileges.
What will this IAM policy do with regard to AWSCloudWatch, { “Version”: “2012-10-17”, “Statement”:[{ “Effect”:”Allow”, “Action”:[“cloudwatch:GetMetricStatistics”,”cloudwatch:ListMetrics”], “Resource”:”*”, “Condition”:{ “Bool”:{ “aws:SecureTransport”:”true” } } } ] }
The policy is a resource-based policy and will allow (cloudwatch:GetMetricStatisticsdata and cloudwatch:ListMetrics) to be called only if SSL is true.
What are the supported notification services for AWSCloudWatch?
SNS
With regard to CloudWatch logs, what is cloud watch logs main purpose?
Enables you to store log information sent from EC2 agents or through the API
How can I count the number of log events arriving at cloudwatch logs?
You can use a cloudwatch metric filter and sets it a pattern and matric name, this will send metric to cloudwatch metric.
If I wanted to log information from the OS in an EC2 instance, is it possible and what do I need to do?
Yes, it is possible, you have to add an agent to the EC2 instance and set up a log group and log stream.
I just installed a CloudWatch log agent on an EC2 instance, configured to send data through VPC IG and internet to CloudWatch, I also set up a log group and log stream, I am not getting data logs to AWS CloudWatch logs, what could be causing this?
The security group rules or ACL could be blocking,
On my VPC I need to be alerted when a connection is attempted from an external IP coming in from the internet, how could I do this?
You could use VPC flow logs and send the flow log data to cloudwatch logs, create a metric filter to send output to cloudwatch metrics, also create a CloudWatch alarm.
I have a log file, is it possible to upload this file to a cloudwatch stream?
Yes, you can use the cloudwatch logs API to upload this file into the log stream. PutLogEvents
Using CLI, how can I get a list of the logs in a log group?
aws logs filter-log-events –log-group-name CloudTrail/DefaultLogGroup
I need to analyze flow logs in AWS Kinesis, how can I do this?
I can configure AWS VPC FlowLogs to be sent to a CloudWatch log stream in a log group, I can subscribe to this stream and have the data delivered to AWS aws kinesis to be analyzed. PutSubscriptionFilter
When I use PutSubscriptionFilter in relation to AWS CloudWatch logs, what am I doing?
You are subscribing to the log stream so you can receive the incoming events as the arrive into the log stream.
With regard to AWS log stream’s, what are the subscriptions endpoints I can use with PutSubscriptionFilte?
An Amazon Kinesis stream belonging to the same account as the subscription filter, for same-account delivery. A logical destination that belongs to a different account, for cross-account delivery. An Amazon Kinesis Firehose delivery stream that belongs to the same account as the subscription filter, for same-account delivery. An AWS Lambda function that belongs to the same account as the subscription filter, for same-account delivery.
With regard to AWS cloudwatch logs, how long can I retain the data for?
For ever
What is the default length of time I can retain data in cloudwatch logs
The default length is for ever
I need to conserve on cost’s in relation to my cloud, i see cloudwatch logs is using quite an amouint of dat and it is growing year on year, i do not nee do keep data over a year, what cna I do usiong AWS functionality?
You can set the retention policy. PutRetentionPolicy ebables you to set the number of days you data is retained and available.
What is a Matric filter in Cloudwatch logs?
A matric filter enables you to create a pattern that will be matched on incoming log events and will add to a custom Cloudwatch metric.
How can I count the number of 404 code coming to my EC2 instance using only AWS services or features?
Can you set up VPC from logs with data sent to cloudwatch log group, set up a metric filter to add to a custom cloudwatch metric.
Where are flow logs sent to, a log group or a log stream?
Flow logs are sent to a log group?
Can I send flow logs to another destination?
Yes you can send to an S3 buckst
When sending logs to Cloudwatch log group, do you need IAM permissions?
Yes, you need an IAM role with permissions to publish to Cloudwatch or S3. This role will be assumed by VPC FlowLOgs service.
On VPC flow logs can I filter on the recorded traffic?
Yes, you can choose to record all, accept or reject traffic.
Will the flow logs have traffic to Amazon DNS servers?
No
Will the low logs have Windows licence activation traffic present?
No
Will DHCP requests be present in the flow logs?
No
How often will flowlogs send data to a Cloudwatch log group?
About every 10min.
What information will flow logs have?
The ENI (Network interface), Accepted or Rejected, src and dest address, src and dest port, protocol, num packets transferred during capture window, windows start time, windows end time, action, log-status (if all capturing was ok).
Can I Tag a log group?
No
Can I Tag a Cloud|Watch log stream?
No.
What is a Cloudwatch metric namespace?
Namespace is a container for Metrics, for example, the AWS/EC2 namespace contains all the metrics for EC2 instances.
What types of metrics are available for S3?
Storage and request.
How often are s3 storage metrics reported?
Once per day.
What intervals are S3 storage matric reported on?
about every 1 min, but only once a day.