|
[Pound Mailing List] HOWTO convert pound logs to apache logs for webalizer: msg#00016web.pound.general
Here is a small script to convert pound logs to be used in webalizer and apache. By default webalizer cannot understand pound logs because of an extra datetime and redirect domain secton in the log entries. So we parse the pound logs line by line to a php script choping the unwanted sections and pipe the output to a file webalizer can read. Requirement: PHP 5.+ pound 2.+ pound.cfg: LogLevel 3 makelog.sh: # extract all pound logs fgrep pound /var/log/messages >/tmp/t.txt #extract and convert logs for just one site fgrep "pound: www.abc.com" /tmp/t.txt | php -F makelog.php >/tmp/abc.com.log makelog.php: <? $p = strpos($argn,"pound:",0) + 7; $s = substr($argn,$p,strlen($argn)-$p); $p = strpos($s," ",0); $s = trim(substr($s,$p,strlen($s)-$p)); echo "$s\n"; ?> The result of the conversion goes to /tmp/abc.com.log in example above. Webalizer can read this file and produce correct results. Regards, Gevik. -- To unsubscribe send an email with subject 'unsubscribe' to pound-Ws3YcLWMCps@xxxxxxxxxxxxxxxxx Please contact roseg-Ws3YcLWMCps@xxxxxxxxxxxxxxxx for questions. http://www.apsis.ch/pound/pound_list/archive/2006/2006-05/1147334721000 |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: [Pound Mailing List] FreeBSD and failed requests: 00016, Scott Larson |
|---|---|
| Next by Date: | Re: [Pound Mailing List] HOWTO convert pound logs to apache logs for webalizer: 00016, Łukasz 'LCF' Jagiełło |
| Previous by Thread: | [Pound Mailing List] flexible idea on how to offer the functionality of how to take server that replies with 5xx errors out of servicei: 00016, gauze-k3bE3hdmy6xg9hUCZPvPmw |
| Next by Thread: | Re: [Pound Mailing List] HOWTO convert pound logs to apache logs for webalizer: 00016, Łukasz 'LCF' Jagiełło |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |