AWS CloudWatch Flashcards Preview

Learn AWS > AWS CloudWatch > Flashcards

Flashcards in AWS CloudWatch Deck (79):
1

What is a AWS CloudWatch Metric?

Is a time-ordered set of data points

2

I have a custom application, can I publish a custom Metric to CloudWatch?

Yes, you can use the CLI or API.

3

How long is data available in a Matric?

15 months before it is overwritten

4

Can you send historical matric data to cloud watch?

Yes, you can send up to 2 weeks of historical data.

5

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.

6

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.

7

What happens to data points of equal to 60 seconds?

They are available for 15 days and then aggregated for long-term storage.

8

What is a CloudWatch dimension?

Is a key-value pair that identifies the matric, you can have up to 10 dimensions on a Metric.

9

How many dimensions can I have?

Up to 10.

10

What is a cloud watch namespace?

A namespace is a container for matric's.

11

Are cloudwatch namespaces isolated from each other?

Yes, AWS/EC2 is seperate from AWS/VPC

12

Can i have 11 dimentions for a matric?

No there is a limit of up to 10.

13

What is a namespace used for?

It holds one or more matric from a common source such as AWS/S3 or AWS/EC2.

14

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.

 

 

 

15

What will a stastic look like?

Minium, Maxum, Sum, Average, SampleCount

16

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.

17

What is a CloudWatch metric statistic period?

It is the period of time the statistic represents.

18

Are cloud watch metric stat period defined in seconds?

Yes periods are defiend in seconds, 360 is six minutes.

19

Are aggrigated cloud watch metric stat be available when now using detailed monitoring?

No dfatiled stats are only available when using detailed monitoring.

20

Can a CloudWatch metric statistic aggregate across regions?

No, data for the statistic comes from the region the statistic is being produced in.

21

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.

22

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.

23

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.

24

What are the supported notification services for AWSCloudWatch?

SNS

25

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

26

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.

27

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.

28

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,

29

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.

30

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

31

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

32

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

33

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.

34

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.

35

With regard to AWS cloudwatch logs, how long can I retain the data for?

For ever

36

What is the default length of time I can retain data in cloudwatch logs

The default length is for ever

37

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.

38

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.

39

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. 

40

Where are flow logs sent to, a log group or a log stream?

Flow logs are sent to a log group?

41

Can I send flow logs to another destination?

Yes you can send to an S3 buckst

42

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. 

43

On VPC flow logs can I filter on the recorded traffic?

Yes, you can choose to record all, accept or reject traffic.

44

Will the flow logs have traffic to Amazon DNS servers?

No

45

Will the low logs have Windows licence activation traffic present?

No

46

Will DHCP requests be present in the flow logs?

No

47

How often will flowlogs send data to a Cloudwatch log group?

About every 10min.

48

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).

49

Can I Tag a log group?

No

50

Can I Tag a Cloud|Watch log stream?

No.

51

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.

52

What types of metrics are available for S3?

Storage and request.

53

How often are s3 storage metrics reported?

Once per day.

54

What intervals are S3 storage matric reported on?

about every 1 min, but only once a day.

55

56

What is a Clouswatch metric statistic used for?

It is used as an ag

gregation for matric data. An example is data points less then 

57

For CloudWatch Metrics for S3, what is the metric for getting the size of the bucket?

BucketSizeBytes

58

For CloudWatch Metrics for S3, what is the metric for getting the number of objects?

NumberofObjects.

59

With regard to CloudWatch Metrics and S3, is BucketSizeBytes and NumberOfObjects a BucketMetric or a Request metric?

A bucket Metric.

60

With regard to CloudWatch Metrics and S3 how can I get Metric values with regard to the S3 requests?

S3 has a list of Metrics available where you can get Metrics for AllRequets, GetRequetss, PutRequets, DeleteRequetss,

61

What CLI command would I used to get S3 Metric information?

aws cloudwatch get-metric-statistics

62

With regard to CloudWatch Metrics, what is a dimension and what is it used for?

A dimension is a set of key-value pairs on a Metric that are used to give the metric extra information that can be used to filter. An example is an S3 Metric has a dimension called StorageType that holds the storage type infolike GLACIER, STANDARD, you know from this that matric is of type X.

 

63

How can we search and filter the published Cloudwatch log and turn results into numerical Cloudwatch Metrics? 

Using Cloudwatch Metric filters, with these filters we can use a pattern syntax to find things like 400 responses and turn this into a Metric data point.

64

When we create a Cloudwatch filter what are the inputs?

filter pattern, name, namespace, metric value, default value.

65

How can I share my log data with another account?

Subscriptions: It is possible to share your log data with another account, the important thing here is data can only be shared with an account with Knesis, Kenisi is the only supported endpoint Cloudwatch supports.

66

I want to share my log data with a Kenisis log aggregator in another account, what do I need to do?

  1.  aws kinesis create-stream
  2. aws logs put-subscription-filter 3.

67

What is cCloudWatch Log Subscription Filter used for? 

It establishes a subscription on a log group and filters using a filter-pattern the traffic and delivers this traffic to another account-kinesis ARN destination.

68

I need to share my logs with another account with a lambda expression, can I use CloudWatch Logs subscriptions?

No, currently the only supported delivery resource in another account is Kenesis

69

Is it possible to share my CloudWatch logs with Lambda?

Yes, I can share my logs with Lambda using a SunscriptionFilter, this will start to deliver my logs to the Lambda resource as a stream.

70

What is a ClouWatch Logs Subscription filter?

This is a filter that when created enables you to subscribe to a CloudWatch logs log group and have the data streamed to an endpoint, supported endpoints are,

  1. Lambda in the same account
  2. Kinesis in the same account
  3. Kinesis in a separate account
  4. ElasticSerch (ES) in same account

 

71

In a CloudWatch logs subscription, what is the filter pattern used for?

 

This is used to filter only the logs info you want and this log data will be streamed to the destination.

72

What be AWS service logs published directly S3?

VPC Flow Logs.

73

I need to get a quick dump of a current AWS CloudWatch log group, how can I do this?

You can use the AWS CloudWatch create-export-task in the CLI to export the data to an S3  bucket.

74

I need to secure the data in the AWS CloudWatch log group, how can I do this?

You can use AWS logs associate-kms-key with the AWS CloudWatch logs log group, dat from the point on will be encrypted.

75

Can I tag an AWS CloudWatch log stream?

Yes

76

How can I measure the number of events into CloudWatch logs?

CloudWatch logs send metrics to CloudWatch, like, 

  • IncomingLogsEvents, 
  • ForwaredBytes
  • IncomingBytes

77

78

79

How can dimensions can I have on a CloudWatch metric?

10