You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Anthony J. Biacco" <ab...@formatdynamics.com> on 2011/04/05 20:21:29 UTC
tomcat and apache log entry correlation with mod_jk
I'm using apache 2.0.17, tomcat 6.0.28 (and soon tomcat 7) with mod_jk
1.2.28 on CentOS 5.5
I'd like to put a unique identifier in the tomcat request log and the
apache request log so that I can match up log entries between the two.
Is there any way to do this with mod_jk, maybe with JkEnvVar? And if so,
what identifier or combination of can I use?
Thanks,
-Tony
---------------------------
Manager, IT Operations
Format Dynamics, Inc.
P: 303-228-7327
F: 303-228-7305
abiacco@formatdynamics.com
http://www.formatdynamics.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: tomcat and apache log entry correlation with mod_jk
Posted by Rainer Jung <ra...@kippdata.de>.
On 05.04.2011 22:44, Anthony J. Biacco wrote:
> FYI, I have this tentatively working with mod_unique_id by doing:
>
> Apache config:
> RequestHeader set UNIQUE_ID %{UNIQUE_ID}e
> JkEnvVar UNIQUE_ID
>
> Tomcat accesslogvalve pattern:
> %{UNIQUE_ID}i
>
> I might use it like this, I might not. They might want a more telling id like apache_host:unique_id
This can be simplified to
JkEnvVar UNIQUE_ID
Apache accesslogvalve pattern:
%{UNIQUE_ID}e
Tomcat accesslogvalve pattern:
%{UNIQUE_ID}r
JkEnvVar forwards the environment variable UNIQUE_ID, which is
automatically set by mod_unique_id (you need to LoadModule
mod_unique_id) to Tomcat as a request attribute. Request attributes can
be logged in the Tomcat accesslog using %{...}r.
Regards,
Rainer
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: tomcat and apache log entry correlation with mod_jk
Posted by "Anthony J. Biacco" <ab...@formatdynamics.com>.
FYI, I have this tentatively working with mod_unique_id by doing:
Apache config:
RequestHeader set UNIQUE_ID %{UNIQUE_ID}e
JkEnvVar UNIQUE_ID
Tomcat accesslogvalve pattern:
%{UNIQUE_ID}i
I might use it like this, I might not. They might want a more telling id like apache_host:unique_id
Thanks,
-Tony
> -----Original Message-----
> From: Anthony J. Biacco [mailto:abiacco@formatdynamics.com]
> Sent: Tuesday, April 05, 2011 1:55 PM
> To: Tomcat Users List
> Subject: RE: tomcat and apache log entry correlation with mod_jk
>
> Nothing yet, was in research and spitball mode, but am currently looking at
> mod_unique_id
>
> -Tony
>
> > -----Original Message-----
> > From: Christopher Schultz [mailto:chris@christopherschultz.net]
> > Sent: Tuesday, April 05, 2011 1:08 PM
> > To: Tomcat Users List
> > Subject: Re: tomcat and apache log entry correlation with mod_jk
> >
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Anthony,
> >
> > On 4/5/2011 2:21 PM, Anthony J. Biacco wrote:
> > > I'm using apache 2.0.17, tomcat 6.0.28 (and soon tomcat 7) with mod_jk
> > > 1.2.28 on CentOS 5.5
> > > I'd like to put a unique identifier in the tomcat request log and the
> > > apache request log so that I can match up log entries between the two.
> > > Is there any way to do this with mod_jk, maybe with JkEnvVar? And if so,
> > > what identifier or combination of can I use?
> >
> > What have you tried so far?
> >
> > If you want to use JkEnvVar, you'll need an environment variable to
> > pass. If you want to set an environment variable in httpd, check out
> > what options you have for setting environment variables to something
> > unique.
> >
> > - -chris
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.10 (MingW32)
> > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> >
> >
> iEYEARECAAYFAk2baIQACgkQ9CaO5/Lv0PChKQCbBAos0bGcLd881hvBzUDoJ9
> > 9o
> > lgMAoJMO9F/IWd/YeoDV4U5XJALeltOA
> > =tiOl
> > -----END PGP SIGNATURE-----
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
RE: tomcat and apache log entry correlation with mod_jk
Posted by "Anthony J. Biacco" <ab...@formatdynamics.com>.
Nothing yet, was in research and spitball mode, but am currently looking at mod_unique_id
-Tony
> -----Original Message-----
> From: Christopher Schultz [mailto:chris@christopherschultz.net]
> Sent: Tuesday, April 05, 2011 1:08 PM
> To: Tomcat Users List
> Subject: Re: tomcat and apache log entry correlation with mod_jk
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Anthony,
>
> On 4/5/2011 2:21 PM, Anthony J. Biacco wrote:
> > I'm using apache 2.0.17, tomcat 6.0.28 (and soon tomcat 7) with mod_jk
> > 1.2.28 on CentOS 5.5
> > I'd like to put a unique identifier in the tomcat request log and the
> > apache request log so that I can match up log entries between the two.
> > Is there any way to do this with mod_jk, maybe with JkEnvVar? And if so,
> > what identifier or combination of can I use?
>
> What have you tried so far?
>
> If you want to use JkEnvVar, you'll need an environment variable to
> pass. If you want to set an environment variable in httpd, check out
> what options you have for setting environment variables to something
> unique.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk2baIQACgkQ9CaO5/Lv0PChKQCbBAos0bGcLd881hvBzUDoJ9
> 9o
> lgMAoJMO9F/IWd/YeoDV4U5XJALeltOA
> =tiOl
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
Re: tomcat and apache log entry correlation with mod_jk
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Anthony,
On 4/5/2011 2:21 PM, Anthony J. Biacco wrote:
> I'm using apache 2.0.17, tomcat 6.0.28 (and soon tomcat 7) with mod_jk
> 1.2.28 on CentOS 5.5
> I'd like to put a unique identifier in the tomcat request log and the
> apache request log so that I can match up log entries between the two.
> Is there any way to do this with mod_jk, maybe with JkEnvVar? And if so,
> what identifier or combination of can I use?
What have you tried so far?
If you want to use JkEnvVar, you'll need an environment variable to
pass. If you want to set an environment variable in httpd, check out
what options you have for setting environment variables to something unique.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk2baIQACgkQ9CaO5/Lv0PChKQCbBAos0bGcLd881hvBzUDoJ99o
lgMAoJMO9F/IWd/YeoDV4U5XJALeltOA
=tiOl
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org