www.HadoopExam.com

HadoopExam Learning Resources

Question 5. You have a website www.QuickTechie.com, there seems to be some problem in the website because static pages of the website is being migrated and visitor faces a problem with

Q5. You have a website www.QuickTechie.com, there seems to be some problem in the website because static pages of the website is being migrated and visitor faces a problem with

404 page not found. Now you want to monitor how many times your Apache servers return a HTTP 404 response, which is the response code for page not found. You might want to monitor this to understand

how often your site visitors do not find the resource they are looking for. Assume that your log records

are structured to include the following information for each log event (site visit):

• Requestor IP Address

• RFC 1413 Identity

• Username

• Timestamp

• Request method with requested resource and protocol

• HTTP response code to request

• Bytes transferred in request

 

An example of this might look like the following:

 

127.0.0.1 - James Bond [10/Oct/2014:13:55:36 -0700] "GET /quicktechie.gif HTTP/1.0" 404 2326

 

 

How would you create the matric for this.

 

 

A. Using CloudWatch Logs

B. This matric is by default available with AWS services

C. In CloudWatch console On the Define Logs Metric Filter screen, in the Filter Pattern field, enter [IP, UserInfo, User,Timestamp, RequestInfo, StatusCode=404, Bytes]

D. By Creating create a metric filter using the AWS CLI

E. You have to write your custom solutions in Java and submit the same to CloudWatch to create matrics

 

1. A,B,D

2. B,C,E

3. A, C,D

4. C,D,E

5. A,C

 

Ans : 3

Exp : To create a metric filter using the CloudWatch console

1. Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/.

2. If necessary, change the region. From the navigation bar, select the region that meets your needs.

For more information, see Regions and Endpoints in the Amazon Web Services General Reference

In the navigation pane, click Logs.

4. In the contents pane, select a log group, and then click Create Metric Filter.

5. On the Define Logs Metric Filter screen, in the Filter Pattern field, enter [IP, UserInfo, User,

Timestamp, RequestInfo, StatusCode=404, Bytes].

6. To test your filter pattern, in the Select Log Data to Test list, select the log group you want to test

the metric filter against, and then click Test Pattern.

7. Under Results, CloudWatch Logs displays a message showing how many occurrences of the filter

pattern were found in the log file.

Note

To see detailed results, click Show test results.

8. Click Assign Metric, and then on the Create Metric Filter and Assign a Metric screen, in the Filter

Name field, enter HTTP404Errors.

9. Under Metric Details, in the Metric Namespace field, enter YourNameSpace.

10. In the Metric Name field, enter ApacheNotFoundErrorCount, and then click Create Filter

 

To create a metric filter using the AWS CLI

• At a command prompt, type:

% aws logs put-metric-filter \

 --log-group-name MyApp/access.log \

 --filter-name HTTP404Errors \

 --filter-pattern '[ip, id, user, timestamp, request, status_code=404,

size]' \

 --metric-transformations \

 metricName=PageNotFoundCount,metricNamespace=YourNamespace,metricValue=1

 

You have no rights to post comments

Comments   

0 # How to Get AWS SA Updated QuestionsJyoti Saxena 2015-05-01 16:51
Hadoopexam, as i get to know you have added 50 more questions for AWS SA certification in your exam simulator. Can you please let us know, how to get those updated questions.
0 # Send Request by Your EmailHadoopExa, 2015-05-01 16:54
Hi Jyoti, please send an email for update request. Billing team will give you the update. Please use same email id which you have used previously.
You are here: Home AWS (Amazon WebService) AWS Sol Architect Associate Question 5. You have a website www.QuickTechie.com, there seems to be some problem in the website because static pages of the website is being migrated and visitor faces a problem with