Loading ...
Sorry, an error occurred while loading the content.

webalizer with special log file format

Expand Messages
  • crawling_weasel
    Hello! I have logfiles which do not work correctly with webalizer 2.01. At my provider I have multiple domains in one package. NOTE: I can download log files
    Message 1 of 5 , Jul 31 4:51 AM
    • 0 Attachment
      Hello!

      I have logfiles which do not work correctly with webalizer 2.01.

      At my provider I have multiple domains in one package. NOTE: I can
      download log files but I can't change the configuration of my server
      to get different log files.

      This is what a typical line of the log file looks like:

      212.40.151.150 - - [19/Jul/2004:00:01:07 +0200] "GET / HTTP/1.1" 200
      17346 www.my-site1.de
      "http://www.google.de/search?q=this+is+an+example%23&ie=UTF-8&hl=de&meta="
      "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)" "-"

      The problem seems to be the additional "www.my-site1.de" which states
      which of my domains in the package was called. But webalizer
      interprets this as the referrer.

      What can I do to get a correct analysis? Once again: I can't change
      the log-file format (unless I run a search and replace on every single
      logfile). I download them and try to analyize them on my local
      computer.

      Any ideas? Thanks a lot in advance.

      Hans
    • Bradford L. Barrett
      ... +++ parser.c Sat Jul 31 09:36:12 2004 @@ -339,6 +339,9 @@ /* done with CLF record */ if (cp1 =eob) return 1; + while ( (*cp1 != 0 ) && (cp1
      Message 2 of 5 , Jul 31 6:41 AM
      • 0 Attachment
        Here is a quick patch to skip the rogue field in your logs:

        ------------- CUT HERE -------------
        --- parser.c.orig Sat Jul 31 09:33:57 2004
        +++ parser.c Sat Jul 31 09:36:12 2004
        @@ -339,6 +339,9 @@
        /* done with CLF record */
        if (cp1>=eob) return 1;

        + while ( (*cp1 != '\0') && (cp1 < eob) ) cp1++; /* skip host id */
        + if (cp1 < eob) cp1++;
        +
        while ( (*cp1 != '\0') && (*cp1 != '\n') && (cp1 < eob) ) cp1++;
        if (cp1 < eob) cp1++;
        /* get referrer if present */
        ------------- CUT HERE -------------


        On Sat, 31 Jul 2004, crawling_weasel wrote:

        > Hello!
        >
        > I have logfiles which do not work correctly with webalizer 2.01.
        >
        > At my provider I have multiple domains in one package. NOTE: I can
        > download log files but I can't change the configuration of my server
        > to get different log files.
        >
        > This is what a typical line of the log file looks like:
        >
        > 212.40.151.150 - - [19/Jul/2004:00:01:07 +0200] "GET / HTTP/1.1" 200
        > 17346 www.my-site1.de
        > "http://www.google.de/search?q=this+is+an+example%23&ie=UTF-8&hl=de&meta="
        > "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)" "-"
        >
        > The problem seems to be the additional "www.my-site1.de" which states
        > which of my domains in the package was called. But webalizer
        > interprets this as the referrer.
        >
        > What can I do to get a correct analysis? Once again: I can't change
        > the log-file format (unless I run a search and replace on every single
        > logfile). I download them and try to analyize them on my local
        > computer.
        >
        > Any ideas? Thanks a lot in advance.
        >
        > Hans
        >
        >
        >
        >
        > Webalizer homepage: http://www.webalizer.org
        > Webalizer for NT: http://www.medasys-lille.com/webalizer/
        >
        >
        > ttp://www.webalizer.org
        > Webalizer for NT: http://www.medasys-lille.com/webalizer/
        >
        >
        >
        > Yahoo! Groups Links
        >
        >
        >
        >
        >
        --
        Bradford L. Barrett brad@...
        A free electron in a sea of neutrons DoD#1750 KD4NAW

        The only thing Micro$oft has done for society, is make people
        believe that computers are inherently unreliable.
      • crawling_weasel
        Hello & Thanks for your answer. So, the only way to do it is to edit the source code? Well, I ll try, but got to get a C-compiler. If anybody has another idea,
        Message 3 of 5 , Jul 31 3:54 PM
        • 0 Attachment
          Hello & Thanks for your answer.

          So, the only way to do it is to edit the source code? Well, I'll try,
          but got to get a C-compiler. If anybody has another idea, please tell me.

          As I never worked with C before allow me to ask further questions to
          make sure:

          > ------------- CUT HERE -------------
          > --- parser.c.orig Sat Jul 31 09:33:57 2004
          > +++ parser.c Sat Jul 31 09:36:12 2004

          So I edit parser.c ...

          > @@ -339,6 +339,9 @@
          > /* done with CLF record */

          Look for this line ...

          > if (cp1>=eob) return 1;
          >

          and after it I insert the following three lines ...

          > + while ( (*cp1 != '\0') && (cp1 < eob) ) cp1++; /* skip host id */
          > + if (cp1 < eob) cp1++;
          > +

          ... and leave everthing else the way it is ...

          > while ( (*cp1 != '\0') && (*cp1 != '\n') && (cp1 < eob) ) cp1++;
          > if (cp1 < eob) cp1++;
          > /* get referrer if present */
          > ------------- CUT HERE -------------

          ... and compile webalizer.c .... that's it ... (?)

          If I understood right no answer is necessary.

          Thanks a lot

          Hans
        • crawling_weasel
          Hello! Well I tried ... but I never worked with C before, did not have an compiler etc. I installed Borland, downloaded gdwin and zlib as dlls and lpng (no dll
          Message 4 of 5 , Aug 1, 2004
          • 0 Attachment
            Hello!

            Well I tried ... but I never worked with C before, did not have an
            compiler etc. I installed Borland, downloaded gdwin and zlib as dlls
            and lpng (no dll available) ... but I did not succeed, simply did not
            understand what to do.

            Is there anywhere a simple step-by-step tutorial how to compile
            webalizer on Windows (XP)? Including all downloads and a
            recommendation which compiler to use?

            Or a way to solve my problem without changing the webalizer source code?

            Thanks a lot in advance

            Hans


            > Hello & Thanks for your answer.
            >
            > So, the only way to do it is to edit the source code? Well, I'll try,
            > but got to get a C-compiler. If anybody has another idea, please
            tell me.
            >
            > As I never worked with C before allow me to ask further questions to
            > make sure:
            >
            > > ------------- CUT HERE -------------
            > > --- parser.c.orig Sat Jul 31 09:33:57 2004
            > > +++ parser.c Sat Jul 31 09:36:12 2004
            >
            > So I edit parser.c ...
            >
            > > @@ -339,6 +339,9 @@
            > > /* done with CLF record */
            >
            > Look for this line ...
            >
            > > if (cp1>=eob) return 1;
            > >
            >
            > and after it I insert the following three lines ...
            >
            > > + while ( (*cp1 != '\0') && (cp1 < eob) ) cp1++; /* skip host id */
            > > + if (cp1 < eob) cp1++;
            > > +
            >
            > ... and leave everthing else the way it is ...
            >
            > > while ( (*cp1 != '\0') && (*cp1 != '\n') && (cp1 < eob) ) cp1++;
            > > if (cp1 < eob) cp1++;
            > > /* get referrer if present */
            > > ------------- CUT HERE -------------
            >
            > ... and compile webalizer.c .... that's it ... (?)
            >
            > If I understood right no answer is necessary.
            >
            > Thanks a lot
            >
            > Hans
          • waldo kitty
            ... that s a diff file... it is meant to be applied to the source by a patch program... it can be done manually, though... lines with + s are added and lines
            Message 5 of 5 , Aug 1, 2004
            • 0 Attachment
              crawling_weasel wrote:

              > Hello & Thanks for your answer.
              >
              > So, the only way to do it is to edit the source code? Well, I'll try,
              > but got to get a C-compiler. If anybody has another idea, please tell me.
              >
              > As I never worked with C before allow me to ask further questions to
              > make sure:
              >
              >
              >>------------- CUT HERE -------------
              >>--- parser.c.orig Sat Jul 31 09:33:57 2004
              >>+++ parser.c Sat Jul 31 09:36:12 2004
              >

              that's a diff file... it is meant to be applied to the source by a patch program... it can be done manually, though... lines with
              +'s are added and lines with -'s are removed... it is /not/ specific to C... it can be used with any text file... i don't think that
              it can be used with binary files... i've never tried...

              also, don't forget that webalizer is developed on a *nix system so many things are going to be *nix based in replies... there is a
              port of webalizer to the windows platform... evidently you have that precompiled version... i'd contact the one who compiled it and
              see if they are willing to add that patch to a special copy/version and compile it for you...

              --
              _\/
              (@@) Waldo Kitty, Waldo's Place USA
              __ooO_( )_Ooo_____________________ telnet://bbs.wpusa.dynip.com
              _|_____|_____|_____|_____|_____|_____ http://www.wpusa.dynip.com
              ____|_____|_____|_____|_____|_____|_____ ftp://ftp.wpusa.dynip.com
              _|_Eat_SPAM_to_email_me!_YUM!__|_____|_____ wkitty42 -at- alltel.net
            Your message has been successfully submitted and would be delivered to recipients shortly.