Forum Moderators: phranque

Message Too Old, No Replies

Apache's Logresolve REPLACING IP with hostname instead of adding

         

ProFiler

6:46 pm on Jan 21, 2004 (gmt 0)

10+ Year Member



I just finished setting up a daily log rotation that includes logs splitted / rotated every 24 hours. Logs being gzipped (after the following) and finally, using apacheīs logresolve (/usr/local/apache/bin/logresolve) to look up the hostnames for the logged IPs instead of doing this realtime (HostnameLookups Off - not a good idea to turn that on, especially on high traffic sites).

The problem I have with that however is that when doing the logresolves, it REPLACES the IP with a hostname in which 9 out of 10 times the IP is no longer there, not even in a 123_456etc. form (which does happen sometime for some ISPs).

If something is every up and I need to search the apache logs for an IP, it will not be possible to match up cuz all I hae is hostname.

Is there any way to tell apache to keep the original IP address while adding itīs hostname next to it?

See also:
[httpd.apache.org...]

To detail it, this is the situation before running logresolve:

123.123.123.123 - - [28/Dec/2003:16:01:05 -0800] "GET /index.pwnd

And this is how the logfile looks AFTER running logresolve:

cache-ntc-af123.proxy.aol.com - - [28/Dec/2003:16:01:05 -0800] "GET /index.pwnd

If anyone can shed any light on this, thx!

hakre

6:57 pm on Jan 21, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



there is no switch for that defined. just create a new accesslog, and then add, line by line (cauze both will have the same entries on each line) the ip-address in front. i guess with grep it should be no prob.

-hakre

ProFiler

7:37 pm on Jan 21, 2004 (gmt 0)

10+ Year Member



bah more shell scripting for this n00b, I glad I finished this 10-line script rofl :)