Jeremy Wadsack wrote:

>heddy Boubaker wrote:
>
>> >> BTW I would like Analog to use IP addresses from X-Forwarded-for field 
>> >> (the web server is behind a firewall and accessible trough a squid
>> >> accelerator only) instead of %h field (which is the machine on which the 
>> >> accelerator is running) BUT only if X-Forwarded-for is defined (-
>> >> elsewhere), some machines have direct access to the web server so the %h 
>> >> is really the client machine. Is there any way to do that w/ analog ?
>>
>> Stephen> No, it can only look in one field at the moment. 
>>
>> The pb is that because of our configuration the %h field is never the
>> accessing host when coming from the outside ... so we have no way w/ analog 
>> to make stats from accessing hosts ... is it planned to integrate such a
>> feature ? Does somebody have any idea of how to use current analog with it ? 
>> Should I have to write an access_log preprocessor or anything similar ?
>>
>I would suggest preprocessing with a Perl scipt (or sed). Something line this 
>would do:
>
>perl -pe "s/^(\S+) \(-\)/$1 \($1\)/;" < log_file > new_log_file

Analog can use two different logformats simultaneously, so you should be able to
just specify your two logformats in the cfg file, and Analog can interpret 
different lines appropriately, as long as it can distinguish the two different 
types of entries - if all the forwarded entries have the proxy servers IP 
address, for example, then by specifying that in the LOGFORMAT string, Analog 
should be able to recognize that line as a forwarded entry, and interpret it 
appropriately.

Aengus
------------------------------------------------------------------------
This is the analog-help mailing list. To unsubscribe from this
mailing list, send mail to [EMAIL PROTECTED]
with "unsubscribe" in the main BODY OF THE MESSAGE.
List archived at http://www.mail-archive.com/analog-help@lists.isite.net/
------------------------------------------------------------------------

Reply via email to