-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/52583/
-----------------------------------------------------------

(Updated Oct. 10, 2016, 8:43 p.m.)


Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Nate Cole, and 
Sid Wagle.


Changes
-------

Have added another method and attached new code diff.
Have marked the bug as fixed and resolved it.


Bugs: AMBARI-18543
    https://issues.apache.org/jira/browse/AMBARI-18543


Repository: ambari


Description
-------

Request/access log feature in Ambari-server


1. Have provided option in ambari.properties to configure the path - 
"server.requestlogs.path"
By default has given it as 
server.requestlogs.path=\var\log\ambari-server\ambari-access-yyyy_mm_dd.log
2. If some customers does not want this to enable then removing 
"server.requestlogs.path" property will not create any file. 
3. currently have set the number of reatin days as 15
4. if somebody wants to reduce/increase that value then add that property in 
ambari.properties file

5. log content should look alike below,
 
 192.168.65.1 -  -  [05/Oct/2016:23:45:18 +0000] "GET / HTTP/1.1" 404 618 "-" 
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:48.0) Gecko/20100101 
Firefox/48.0"

Please review and provide your comments.


Diffs (updated)
-----

  ambari-server/conf/windows/ambari.properties 64cce3b 
  
ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
 2e850ef 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
 5e498f0 

Diff: https://reviews.apache.org/r/52583/diff/


Testing
-------

1. install and start  Ambari-server, access the UI. 
Expected Result: server should create ambari-server-access-yyyy_mm_dd.log
Result: PASS

2. access few links in ambari server UI
Expected Result: server should log URL and response code
Result: PASS

3. Remove entry server.requestlogs.path from ambari.properties 
Expected Result: server should not create any request log
Result: PASS

4. change the log path server.requestlogs.path in ambari.properties and restart 
server
Expected Result: it should create request log in new path
Result: PASS


File Attachments
----------------

sample request log
  
https://reviews.apache.org/media/uploaded/files/2016/10/10/c6ccec4e-dd49-4f13-8533-bf20e13f9b2f__ambari-access-2016_10_10.log.bk


Thanks,

Amarnath reddy pappu

Reply via email to