proxy logging code

proxy logging code

am 14.03.2002 23:46:07 von agfoust

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C1CBAA.07D59040
Content-Type: text/plain

Hello, I apologize if this issue has come up before, but I thought I would
run it by the list before proceeding with modifying the mod_proxy C code:

My organization uses the Apache proxy functionality pretty extensively, both
reverse and forward. There doesn't seem to be any way to log proxy transfer
information associated with a request to the access logs. We have some
Netscape proxies we want to retire and quite a bit of cache and throughput
performance monitoring based on the transfer logs that I can't seem to
duplicate with Apache. In particular, I need to log the following additional
request items:

. . . s2 c2 b1 b2 h1 h2 h3 h4 dnstm route

s2 - remote server status response
c2 - bytes served from remote host
b1 - client request body size
b2 - proxy request body size
h1 - client request header size
h2 - proxy response to client header size
h3 - proxy request to remote header size
h4 - remote response header size
dnstm - remote host DNS resolve time (ms), or "-" for ProxyRemote
forwards
route - "remoteproxy:port" or "-"

I believe the standard response to this issue is "why don't you just use
Squid?", and my response to that is that I don't want to unless I have to.
We are doing a lot of reverse-proxy virtual hosting along with caching, and
we like Apache just fine. The Apache performance is acceptable, etc. We also
use quite a bit of mod_perl. In the case of our old existing Netscape
proxies, I have quite a bit of NSAPI C code (access control system) I need
to rewrite, and I would prefer to code it using the Apache API. (And no,
Squid's out-of-the-tarball access control doesn't come anywhere near
handling our needs, interfacing with our systems, etc).

If the answer is "you'll have to code it yourself", that's fine, but I
wanted to check first. We're still using the Apache 1.3.x source base and do
not plan on tackling the 2.0 stuff for a while (until the proxy and cache
functionality is more solid, etc). My coding strategy for adding the
additional proxy log items will probably make use of the mod_log_config
facility to log "notes" (e.g. "%{proxy-s2}n) from other modules, mod_proxy
in this case, using the ap_table_set(r->notes,"proxy-s2","...") API call.

Is the r->notes approach the best strategy? Should I contribute the code
back to the Apache group, or is logging proxy cache information too esoteric
to be of general use?

Any help, info, insights are welcome.


------_=_NextPart_001_01C1CBAA.07D59040
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable




charset=3Dus-ascii">
5.5.2653.12">
proxy logging code



Hello, I apologize if this issue has =
come up before, but I thought I would run it by the list before =
proceeding with modifying the mod_proxy C code:



My organization uses the Apache proxy =
functionality pretty extensively, both reverse and forward. There =
doesn't seem to be any way to log proxy transfer information associated =
with a request to the access logs. We have some Netscape proxies we =
want to retire and quite a bit of cache and throughput performance =
monitoring based on the transfer logs that I can't seem to duplicate =
with Apache. In particular, I need to log the following additional =
request items:



 


I believe the standard response to =
this issue is "why don't you just use Squid?", and my =
response to that is that I don't want to unless I have to. We are doing =
a lot of reverse-proxy virtual hosting along with caching, and we like =
Apache just fine. The Apache performance is acceptable, etc. We also =
use quite a bit of mod_perl. In the case of our old existing Netscape =
proxies, I have quite a bit of NSAPI C code (access control system) I =
need to rewrite, and I would prefer to code it using the Apache API. =
(And no, Squid's out-of-the-tarball access control doesn't come =
anywhere near handling our needs, interfacing with our systems, =
etc).



If the answer is "you'll have to =
code it yourself", that's fine, but I wanted to check first. We're =
still using the Apache 1.3.x source base and do not plan on tackling =
the 2.0 stuff for a while (until the proxy and cache functionality is =
more solid, etc). My coding strategy for adding the additional proxy =
log items will probably make use of the mod_log_config facility to log =
"notes" (e.g. "%{proxy-s2}n) from other modules, =
mod_proxy in this case, using the =
ap_table_set(r->notes,"proxy-s2","...") API =
call.



Is the r->notes approach the best =
strategy? Should I contribute the code back to the Apache group, or is =
logging proxy cache information too esoteric to be of general =
use?



Any help, info, insights are =
welcome.





------_=_NextPart_001_01C1CBAA.07D59040--