Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 20th February 2007, 05:38
tsj5j tsj5j is offline
Junior Member
 
Join Date: Feb 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Traffic Statistics Not Working

Hello,

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 :
Quote:
30 00 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/logs.php &> /dev/null
59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/ftp_logs.php &> /dev/null
59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/mail_logs.php &> /dev/null
59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/cleanup.php &> /dev/null
0 4 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php &> /dev/null
0,30 * * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/check_services.php &> /dev/null
15 3,15 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/quota_msg.php &> /dev/null
40 00 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/traffic.php &> /dev/null
05 02 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/backup.php &> /dev/null
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.

QUESTIONS
- What am I doing wrong?
- Which Shell PHP file controls the updating of traffic usage?
Reply With Quote
Sponsored Links
  #2  
Old 20th February 2007, 07:58
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,421
Thanks: 812
Thanked 5,205 Times in 4,081 Posts
Default

Quote:
- What am I doing wrong?
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.

Quote:
- Which Shell PHP file controls the updating of traffic usage?
/root/ispconfig/scripts/shell/logs.php
/root/ispconfig/scripts/shell/webalizer.php
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 20th February 2007, 08:22
tsj5j tsj5j is offline
Junior Member
 
Join Date: Feb 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
218.186.10.12 unknownbrowse.com - [20/Feb/2007:01:10:31 -0600] "GET /index.php?q=aHR0cDovL3d3dy55b3V0dWJlLmNvbS9jc3MvYm FzZV95dHMxMTcwMTAwMjU3LmNzcw%3D%3D HTTP/1.1" 200 20002 "http://unknownbrowse.com/index.php?q=aHR0cDovL3d3dy55b3V0dWJlLmNvbQ%3D%3D&h l=3ed" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9) Gecko/20061206 Firefox/1.5.0.9"
A sample line from the access log ouput.

I don't see how ISPConfig is unable to read it since Webalizer reads it fine.
Reply With Quote
  #4  
Old 20th February 2007, 08:32
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,421
Thanks: 812
Thanked 5,205 Times in 4,081 Posts
Default

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:

Code:
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
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 20th February 2007, 08:55
tsj5j tsj5j is offline
Junior Member
 
Join Date: Feb 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Just curious, why can webalizer parse it fine?

Can you also show me a sample output line? Thanks.
Reply With Quote
  #6  
Old 20th February 2007, 09:15
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,421
Thanks: 812
Thanked 5,205 Times in 4,081 Posts
Default

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.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 20th February 2007, 09:17
tsj5j tsj5j is offline
Junior Member
 
Join Date: Feb 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.
Reply With Quote
  #8  
Old 20th February 2007, 10:26
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,421
Thanks: 812
Thanked 5,205 Times in 4,081 Posts
Default

Quote:
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.
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.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #9  
Old 20th February 2007, 10:31
tsj5j tsj5j is offline
Junior Member
 
Join Date: Feb 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
Reply With Quote
  #10  
Old 20th February 2007, 10:34
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,421
Thanks: 812
Thanked 5,205 Times in 4,081 Posts
 
Default

Quote:
Originally Posted by tsj5j
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
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.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Quota Limits and Traffic Limits Not Working protocol Installation/Configuration 12 20th March 2007 08:56
Traffic Stats not working. willebanks Installation/Configuration 6 5th January 2007 00:28
Server is constantly working hard without any traffic beatty_t Server Operation 4 15th September 2006 13:20
Traffic overview in ISP Manager > ISP Site > Statistics: Overall 0.00 tom Installation/Configuration 2 23rd April 2006 14:17
Traffic Limit katschi Feature Requests 2 16th August 2005 23:40


All times are GMT +2. The time now is 04:41.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.