![]() |
H-Sphere traffic_log not updating
There are visible requests in access log configured via vhost but no traffic
related to web site in H-Sphere traffic_log log 0.4.6.3 - - [03/Oct/2012:13:10:52 +0200] "GET /site/wp-admin/post.php?post=135&action=edit&message=1 HTTP/1.1" 200 21944 "http://...nhagen.dk/site/wp-admin/post.php?post=135&action=edit&message=1" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:15.0) Gecko/20100101 Firefox/15.0.1" 0.4.6.3 - - [03/Oct/2012:13:10:56 +0200] "GET /site/wp-admin/admin-ajax.php?action=oembed-cache&post=135 HTTP/1.1" 200 21 "http://...nhagen.dk/site/wp-admin/post.php?post=135&action=edit&message=1" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:15.0) Gecko/20100101 Firefox/15.0.1" # tail -f traffic_log 1349259007 2.7.2.6 36 177 1349259007 2.7.2.6 30 177 1349259009 2.7.2.6 38 712 1349259020 2.7.2.6 469 203 Only main IP of web server is there. Should I do some magic passes to let mod_psoft_traffic collect the stats right? |
We use H-Sphere apache configs with litespeed
Logging section looks like <IfModule log_config_module> LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common LogFormat "%{Referer}i -> %U" referer LogFormat "%{User-agent}i" agent BufferedLogs On CustomLog /hsphere/local/var/httpd/logs/access_log combined # Custom Psoft directive to provide logging into traffic_log file # for VH with redefined CustomLog. Do not change its status! AlwaysServerLogs on <IfModule logio_module> LogFormat "%{%s}t %v %I %O" combinedio CustomLog /hsphere/local/var/httpd/logs/traffic_log combinedio </IfModule> </IfModule> However the only records I can see is the ones with IP addresses, instead of host names. Like this # tail -f traffic_log 1349259007 2.7.2.6 36 177 1349259007 2.7.2.6 30 177 1349259009 2.7.2.6 38 712 1349259020 2.7.2.6 469 203 If I delete log setting records from httpd.conf and set it is litespeed admin like File Name /hsphere/local/var/httpd/logs/traffic_log Piped Logger Not Set Log Format %{%s}t %v %I %O Log Headers Referrer UserAgent Host None Rolling Size (bytes) 100M Keep Days 1 Compress Archive Yes I have no logs at all. We are on 2CPU Enterprise license. |
got this link:
http://www.psoft.net/HSdocumentation...ilt-in_traffic so the 2nd field should be domain name instead of IP address, do you know where and what the log format is defined ? |
Log and log format is defined in in
/hsphere/shared/apache2/conf/httpd.conf Litespeed is configured Using Apache Configuration Load Apache Configuration Yes Auto Reload On Changes No Apache Binary Path /hsphere/shared/apache2/bin/httpd.worker Apache Configuration File /hsphere/local/config/httpd2/httpd.conf I can PM you /hsphere/shared/apache2/conf/httpd.conf |
for a quick test, how about change
Quote:
Log Format %{%s}t %{Host}i %I %O |
OK, now I see, the problem is instead of loggin all to /hsphere/shared/apache/logs/traffic_log it write only entries for web sites
which have no TransferLog enabled in virtual host config. But, all I need is to have a separate log files for virtual hosts and one traffic_log for all to collect traffic statistic. Instead of having records in user logs OR in traffic_log. As for LogFormat "%{%s}t %{Host}i %I %O" combinedio it looks fine now. It write http_host value. But I need %v The canonical ServerName of the server serving the request. which is slightly different. |
Quote:
CustomLog /hsphere/local/var/httpd/logs/traffic_log combinedio in every virtual host's configuration. |
O_o ????
wonder why it works in apache and dont in litespeed. is there any right solution but modify user vhosts? |
%%%
I did some tests for"%v" under pure apache, it acts like litespeed: virtualhost's server name not showing there --- since my test env not good today, it may be wrong. it's best you can work out a test case which I can reproduce it. according http://www.psoft.net/HSdocumentation...ilt-in_traffic Quote:
if so, there may be no other better way than every virtual host to include "CustomLog /hsphere/local/var/httpd/logs/traffic_log combinedio" to mimic this H-Sphere's behavior. |
Dear Nite,
Looks like you suggestion about put log to vhosts works. So I'll try it on live servers, if there will be no issues in regards to performance etc it could be the workaround! I'll let ya know Monday. Thank you for your efforts! |
| All times are GMT -7. The time now is 12:13 AM. |