You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Frank Niedermann <fb...@thelogic.org> on 2006/09/11 16:47:58 UTC

Log analysis with Apache, mod_jk and 2 Tomcat instances

Hello,

for a project I had to set up an environment with Apache2, mod_jk and 2 Tomcat
instances. Apache2 / mod_jk will route requests to Tomcat1 and Tomcat2 (load
balancing).

How can I install a log analysis tool like AWstats into this environment?

I mean which log files should I use, Apache2-log, Tomcat1-log or Tomcat2-log?
Can I combine them all together?

Thanks,
  Frank


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Log analysis with Apache, mod_jk and 2 Tomcat instances

Posted by Rainer Jung <ra...@kippdata.de>.
Marc Richards wrote:
> Also you can configure Apache to log the value of the
> session cookie (if you're using session cookies --
> LogFormat "%{JSESSIONID}C..."), which includes the lb
> route so that you even know which instance of Tomcat
> took the request.

... and finally once we release the next mod_jk version (soon), there is 
even more info from the load balancer worker available for logging in 
the usual Apache access log. Information available includes the target 
worker chosen by the load balancer, it's load values, error states etc.

One reason for additional access logging in tomcat would be, if you've 
got performance problems and want to measure response times directly in 
the web container.

Another reason with mod_jk including the latest officially released: 
you've got session problems and want to track, which container instance 
your request went to. Using the Cookie in the apache access logs is OK, 
but in case the load balancer has a worker in error state, you wont 
recognize, that the requests haven't been handled sticky.

Regards,

Rainer

> 
> -marc
> 
> --- Tim Funk <fu...@joedog.org> wrote:
> 
> 
>>If apache is serving all the traffic - then tomcat
>>doesn't need to 
>>record any access logs. (Unless you need monitor how
>>much load went to 
>>each tomcat) Apache will have every request. If you
>>combine the logs - 
>>you would double count some of your requests.
>>
>>-Tim
>>
>>Frank Niedermann wrote:
>>
>>>Hello,
>>>
>>>for a project I had to set up an environment with
>>
>>Apache2, mod_jk and 2 Tomcat
>>
>>>instances. Apache2 / mod_jk will route requests to
>>
>>Tomcat1 and Tomcat2 (load
>>
>>>balancing).
>>>
>>>How can I install a log analysis tool like AWstats
>>
>>into this environment?
>>
>>>I mean which log files should I use, Apache2-log,
>>
>>Tomcat1-log or Tomcat2-log?
>>
>>>Can I combine them all together?
>>>  
>>
>>
>>
> ---------------------------------------------------------------------
> 
>>To start a new topic, e-mail:
>>users@tomcat.apache.org
>>To unsubscribe, e-mail:
>>users-unsubscribe@tomcat.apache.org
>>For additional commands, e-mail:
>>users-help@tomcat.apache.org
>>
>>
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Log analysis with Apache, mod_jk and 2 Tomcat instances

Posted by Marc Richards <mj...@yahoo.com>.
Also you can configure Apache to log the value of the
session cookie (if you're using session cookies --
LogFormat "%{JSESSIONID}C..."), which includes the lb
route so that you even know which instance of Tomcat
took the request.

-marc

--- Tim Funk <fu...@joedog.org> wrote:

> If apache is serving all the traffic - then tomcat
> doesn't need to 
> record any access logs. (Unless you need monitor how
> much load went to 
> each tomcat) Apache will have every request. If you
> combine the logs - 
> you would double count some of your requests.
> 
> -Tim
> 
> Frank Niedermann wrote:
> > Hello,
> >
> > for a project I had to set up an environment with
> Apache2, mod_jk and 2 Tomcat
> > instances. Apache2 / mod_jk will route requests to
> Tomcat1 and Tomcat2 (load
> > balancing).
> >
> > How can I install a log analysis tool like AWstats
> into this environment?
> >
> > I mean which log files should I use, Apache2-log,
> Tomcat1-log or Tomcat2-log?
> > Can I combine them all together?
> >   
> 
> 
>
---------------------------------------------------------------------
> To start a new topic, e-mail:
> users@tomcat.apache.org
> To unsubscribe, e-mail:
> users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail:
> users-help@tomcat.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Log analysis with Apache, mod_jk and 2 Tomcat instances

Posted by Tim Funk <fu...@joedog.org>.
If apache is serving all the traffic - then tomcat doesn't need to 
record any access logs. (Unless you need monitor how much load went to 
each tomcat) Apache will have every request. If you combine the logs - 
you would double count some of your requests.

-Tim

Frank Niedermann wrote:
> Hello,
>
> for a project I had to set up an environment with Apache2, mod_jk and 2 Tomcat
> instances. Apache2 / mod_jk will route requests to Tomcat1 and Tomcat2 (load
> balancing).
>
> How can I install a log analysis tool like AWstats into this environment?
>
> I mean which log files should I use, Apache2-log, Tomcat1-log or Tomcat2-log?
> Can I combine them all together?
>   


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org