You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Bert Van Kets <be...@vankets.com> on 2002/02/26 15:35:11 UTC

log analysis

With all the tools that are built into cocoon lately, is it possible to 
generate XML from web server log files?  I'd like to parse log files from 
Apache and IIS.
How would I do this?
Bert

"My spelling is Wobbly.  It's good spelling but it Wobbles, and the letters
  get in the wrong places." A. A. Milne (1882-1958)


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: log analysis

Posted by Bertrand Delacretaz <bd...@codeconsult.ch>.
On Wednesday 27 February 2002 09:09, Bert Van Kets wrote:
>. . .
> but I'm not going to learn PERL to get a Cocoon app going, even if
> PERL is a better text parser.  Is there a generator that can parse
> the log files at this time?

You might want to have a look at chaperon 
(http://sourceforge.net/projects/chaperon), a highly configurable 
parser that produces XML and can be integrated into Cocoon.

I don't think it has a grammar for log files already, but it shouldn't 
be too hard to write one, or adapt an existing log files grammar if you 
can find one on the web.

-- 
 Bertrand Delacrétaz (codeconsult.ch, jfor.org)

 buzzwords: XML, java, XSLT, cocoon, mentoring/teaching/coding.
 disclaimer: eternity is very long. mostly towards the end. get ready.






---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: log analysis

Posted by Bert Van Kets <be...@visitronics.be>.
Thanks,
but I'm not going to learn PERL to get a Cocoon app going, even if PERL is 
a better text parser.  Is there a generator that can parse the log files at 
this time?
Bert

At 10:36 26/02/2002 -0500, you wrote:
>Bert Van Kets wrote:
>>With all the tools that are built into cocoon lately, is it possible to 
>>generate XML from web server log files?  I'd like to parse log files from 
>>Apache and IIS.
>>How would I do this?
>>Bert
>
>
>Personally, I find that PERL is the language of choice for log munging.
>You are going to find that it is the most efficient language for the
>job.
>
>Here is what you will discover:
>
>1) Apache/IIS logs get really long really quickly.
>2) It will take approx. 30-120 seconds to process a long log file
>3) It should only be done periodically (i.e. chron job).  This may open
>    security holes so be careful.  Some gray hats I know strongly advise
>    against using the Chron daemon--discuss with the admin of the
>    machine.
>
>I assisted a friend of mine with a perl program to munge the logs from
>Squid to see where students were trying to go on the web.  The reports
>were broken down into 1 month periods.  He had one script to break the
>log file apart based on a begin and end date.  Another to do the actual
>munging.
>
>The logs were used to find any inapropriate sites that the proxy wasn't
>already blocking.  It's amazing how popular Britney Spears is with
>teenagers.  It also narrowed down the proxy request to the machine
>making it.  That way the teachers were able to help kids with certain
>"problems".  (Considering it was a church educating the students it was
>entirely appropriate--no comments from bleeding heart liberals please).
>
>Hope this helps.
>
>--
>
>"They that give up essential liberty to obtain a little temporary safety
>  deserve neither liberty nor safety."
>                 - Benjamin Franklin
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
>For additional commands, email: cocoon-dev-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: log analysis

Posted by Stefano Mazzocchi <st...@apache.org>.
Berin Loritsch wrote:

> It's amazing how popular Britney Spears is with
> teenagers.  It also narrowed down the proxy request to the machine
> making it.  That way the teachers were able to help kids with certain
> "problems".  (Considering it was a church educating the students it was
> entirely appropriate--no comments from bleeding heart liberals please).

ROTFL :)

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: log analysis

Posted by Berin Loritsch <bl...@apache.org>.
Bert Van Kets wrote:
> With all the tools that are built into cocoon lately, is it possible to 
> generate XML from web server log files?  I'd like to parse log files 
> from Apache and IIS.
> How would I do this?
> Bert


Personally, I find that PERL is the language of choice for log munging.
You are going to find that it is the most efficient language for the
job.

Here is what you will discover:

1) Apache/IIS logs get really long really quickly.
2) It will take approx. 30-120 seconds to process a long log file
3) It should only be done periodically (i.e. chron job).  This may open
    security holes so be careful.  Some gray hats I know strongly advise
    against using the Chron daemon--discuss with the admin of the
    machine.

I assisted a friend of mine with a perl program to munge the logs from
Squid to see where students were trying to go on the web.  The reports
were broken down into 1 month periods.  He had one script to break the
log file apart based on a begin and end date.  Another to do the actual
munging.

The logs were used to find any inapropriate sites that the proxy wasn't
already blocking.  It's amazing how popular Britney Spears is with
teenagers.  It also narrowed down the proxy request to the machine
making it.  That way the teachers were able to help kids with certain
"problems".  (Considering it was a church educating the students it was
entirely appropriate--no comments from bleeding heart liberals please).

Hope this helps.

-- 

"They that give up essential liberty to obtain a little temporary safety
  deserve neither liberty nor safety."
                 - Benjamin Franklin


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org