Traffic Statistics Not Working

Discussion in 'Installation/Configuration' started by tsj5j, Feb 20, 2007.

  1. tsj5j

    tsj5j New Member


    I am using a hacked version of ISPConfig to make it work with lighttpd.
    Currently, everything works fine - except traffic statistics.

    It seems that traffic statistics for websites aren't monitored.
    I'm sure the sites are being used, and I even made some test downloads.
    However, the statistics remained at 0.

    I then proceed to check my crontab, and found :
    Seems fine to me. I then tried to run every line in the crontab manually.
    The web traffic statistics remained at 0, but the FTP statistics updated.

    I went to check the access log files - they were present and recording accurately.
    I went to check the webalizer output files (HTML) - those recorded the KB of bandwidth accurately as well.

    The only thing is I can't get ISPConfig to get its statistics updated.

    - What am I doing wrong?
    - Which Shell PHP file controls the updating of traffic usage?
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    I'am not sure if traffic stats for lighttpd are implemented at all. It will only work if your httpd server writes the exact same files then apache.

  3. tsj5j

    tsj5j New Member

    A sample line from the access log ouput.

    I don't see how ISPConfig is unable to read it since Webalizer reads it fine.
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats not compatible with ISPConfig. If you want to get splitted logs, the must have the following format and they must be logged by cronolog.

    Apache directive:

    LogFormat "%v||||%b||||%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig
    CustomLog "|/root/ispconfig/cronolog --symlink=/var/log/httpd/ispconfig_access_log /var/log/httpd/ispconfig_access_log_%Y_%m_%d" combined_ispconfig
  5. tsj5j

    tsj5j New Member

    Just curious, why can webalizer parse it fine?

    Can you also show me a sample output line? Thanks.
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Webalizer did not parse this file directly, it is parsed by the ISPConfig logs script to account the traffic and split the file for the websites.
  7. tsj5j

    tsj5j New Member

    What I mean is, I'm curious how webalizer.php parses the logs sucessfully and output correct HTML files in the stats folder in all my sites probably.

    Yet ISPConfig doesn't seem to get its traffic stats updated.
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    webalizer.php does not paerse these logs as I posted above. The logs where parsed and splitted by logs.php and stored in the log directory of the websites. When this is finished, webalizer.php runs the webalizer program for every splitted logfile to generate the statistics.

    Have a look at the code if you want to know how the logfiles where processed in detail.
  9. tsj5j

    tsj5j New Member

    Strange. My site is being processed differently.

    LightTPD stores a single log in the where the log file is set, and a log file for each and every site.
    Webalizer reads the logs generated in each site and generates the HTML output.

    No splitting involved 0.0
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Either you write a logfile as I explained above or you are not able to use the ISPConfig traffic accounting and webalizer stats. I've written these scripts so I know what I'am talking about.
  11. tsj5j

    tsj5j New Member

    Sorry to bother you with my inexperienced questions.

    Can you please post a sample line of what Apache will output into the log files?
    You have previously mentioned mine was incorrect.

    Please paste it at and post the link here to retain readability.
  12. falko

    falko Super Moderator ISPConfig Developer

    A sample line of what is logged looks like this:

    Code:||||49718|||| - - [21/Feb/2007:22:35:25 +0100] "GET /8schloss.htm HTTP/1.1" 200 49718 "" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    After the logsplit file has run, the individual log files for each web look like this:

    Code: - - [21/Feb/2007:22:35:25 +0100] "GET /8schloss.htm HTTP/1.1" 200 49718 "" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    (the first two columns (web site name and file size) are removed).

Share This Page