> On Oct. 6, 2016, 2:55 p.m., Nate Cole wrote:
> > ambari-server/conf/unix/ambari.properties, line 78
> > <https://reviews.apache.org/r/52583/diff/1/?file=1523456#file1523456line78>
> >
> >     Not really a path, more like "pattern" or "format".  Probably disable 
> > by default.
> >     
> >     
> >     Are PUT/POST added to the log?  With data?

For PUT/POST it does not print any data. here is an example

0:0:0:0:0:0:0:1 -  -  [10/Oct/2016:19:08:29 +0000] "POST 
https://localhost:8441/agent/v1/heartbeat/c6407.ambari.apache.org HTTP/1.1" 200 
230 "-" "-"  60
0:0:0:0:0:0:0:1 -  -  [10/Oct/2016:19:08:29 +0000] "POST 
https://localhost:8441/agent/v1/register/c6407.ambari.apache.org HTTP/1.1" 200 
29619 "-" "-"  309


> On Oct. 6, 2016, 2:55 p.m., Nate Cole wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java,
> >  lines 1685-1687
> > <https://reviews.apache.org/r/52583/diff/1/?file=1523458#file1523458line1685>
> >
> >     Description is wrong (copy/paste?).  Also property name should be 
> > pattern or format, not "path"

addressed, attaching modified code for review.


> On Oct. 6, 2016, 2:55 p.m., Nate Cole wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java,
> >  lines 626-628
> > <https://reviews.apache.org/r/52583/diff/1/?file=1523459#file1523459line626>
> >
> >     I think this is something that should be disabled by default and 
> > enabled for support purposes.  What goes in the log?  POST/PUT bodies?

yeah agreed - removed the properties from ambari.properties file. only way to 
enable this is, add server.requestlogs.path in properties


> On Oct. 6, 2016, 2:55 p.m., Nate Cole wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java,
> >  line 627
> > <https://reviews.apache.org/r/52583/diff/1/?file=1523459#file1523459line627>
> >
> >     !StringUtils.isBlank(...)

implemented.


> On Oct. 6, 2016, 2:55 p.m., Nate Cole wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java,
> >  lines 634-635
> > <https://reviews.apache.org/r/52583/diff/1/?file=1523459#file1523459line634>
> >
> >     Why only use the default value?  Isn't that why it's configurable?

This is configurable.


> On Oct. 6, 2016, 2:55 p.m., Nate Cole wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java,
> >  line 641
> > <https://reviews.apache.org/r/52583/diff/1/?file=1523459#file1523459line641>
> >
> >     Agent communication is pretty stable, what purpose is there in logging 
> > it?  Maybe a separate config for that?

we were still observing some agent communication issues. basically using access 
log we can find out how much time Ambari is taking to respond back for each 
agent as well.


- Amarnath reddy


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


On Oct. 5, 2016, 11:51 p.m., Amarnath reddy pappu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52583/
> -----------------------------------------------------------
> 
> (Updated Oct. 5, 2016, 11:51 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Nate Cole, 
> and Sid Wagle.
> 
> 
> 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
> -----
> 
>   ambari-server/conf/unix/ambari.properties 4dcbe99 
>   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
> 
> 
> Thanks,
> 
> Amarnath reddy pappu
> 
>

Reply via email to