PDA

View Full Version : view webalizer stats


kuyaedz
1st December 2005, 03:41
I've done the default installation for ISPConfig (Ubuntu Breezy 5.10) but I have not yet figured out how to view my webalizer stats. I see stats being posted daily in /var/log/httpd/... how do I view my stats via the web?

I'm sure its something simple I've missed. Thanks

falko
1st December 2005, 11:07
Let's say you've created a web site www.example.com. Then your stats are in www.example.com/stats.
http://www.ispconfig.org/downloads/manual_en/manual_kunde_en_src.htm#4_3_2

kuyaedz
1st December 2005, 16:31
I get 404 Error - File not found! with any of my virtual hosts. Have I perhaps missed a setting that would create the /stats/ in each domain?

Thank you again

till
1st December 2005, 16:39
1) The stats are being generated nightly, so you will have to wait up to 24 hours until they where generated.

2) Check if webalizer is installed with the command: "which webalizer"

3) If the points above wont help, please execute "ls /var/log/httpd" and post the output here.

kuyaedz
1st December 2005, 16:45
which webalizer gives me: /usr/bin/webalizer

output of my /var/log/httpd/:

ispconfig_access_log ispconfig_access_log_2005_11_23
ispconfig_access_log_2005_11_15 ispconfig_access_log_2005_11_24
ispconfig_access_log_2005_11_16 ispconfig_access_log_2005_11_25
ispconfig_access_log_2005_11_17 ispconfig_access_log_2005_11_26
ispconfig_access_log_2005_11_18 ispconfig_access_log_2005_11_27
ispconfig_access_log_2005_11_19 ispconfig_access_log_2005_11_28
ispconfig_access_log_2005_11_20 ispconfig_access_log_2005_11_29
ispconfig_access_log_2005_11_21 ispconfig_access_log_2005_11_30
ispconfig_access_log_2005_11_22 ispconfig_access_log_2005_12_01

till
1st December 2005, 16:49
Sorry, i mean the directory /var/log/httpd/ (missed the slash).

falko
1st December 2005, 17:46
Maybe this helps you: http://www.howtoforge.com/forums/showthread.php?t=562

crudolphy
5th December 2005, 20:39
I followed the link posted above by Falko and followed the instructions from this thread and it corrected the problem I was having:) .

Good instructions.

Thanks

Chuck Rudolphy

kuyaedz
5th December 2005, 20:44
Is there anything else that I need to do in order to access my stats? I've noticed that my stats are compiling (in /var/log/httpd/) but I have no /stats/ in my domains. Is there something I've missed in linking the compiled logs to /stats?

till
5th December 2005, 22:22
After you have corrected the cron problem, like fako posted above, you will have to wait up to 24 hours until your stats where generated. The cronjob runs each morning.

kuyaedz
5th December 2005, 22:33
...its been four days since I edited the cronjob with no change. Any other suggestions?

till
5th December 2005, 22:40
Did you have still cron errors in your syslog?

You can try to execute the scripts manually:

/root/ispconfig/php/php /root/ispconfig/scripts/shell/logs.php

and after it has finished:

/root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php

Did you get errors?

kuyaedz
5th December 2005, 23:15
this is the output of grep -i cron /var/log/syslog

Dec 5 06:39:01 localhost /USR/SBIN/CRON[11804]: (root) CMD ( [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm)
Dec 5 06:39:01 localhost /USR/SBIN/CRON[11806]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Dec 5 07:09:01 localhost /USR/SBIN/CRON[12204]: (root) CMD ( [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm)
Dec 5 07:09:01 localhost /USR/SBIN/CRON[12206]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Dec 5 07:17:01 localhost /USR/SBIN/CRON[12326]: (root) CMD ( run-parts --report /etc/cron.hourly)
Dec 5 07:39:01 localhost /USR/SBIN/CRON[12621]: (root) CMD ( [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm)
Dec 5 07:39:01 localhost /USR/SBIN/CRON[12623]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Dec 5 08:00:02 localhost /USR/SBIN/CRON[12967]: (list) CMD ([ -x /usr/lib/mailman/cron/checkdbs ] && /usr/lib/mailman/cron/checkdbs)
Dec 5 08:09:01 localhost /USR/SBIN/CRON[13399]: (root) CMD ( [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm)
Dec 5 08:09:01 localhost /USR/SBIN/CRON[13400]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Dec 5 08:17:01 localhost /USR/SBIN/CRON[13545]: (root) CMD ( run-parts --report /etc/cron.hourly)
Dec 5 08:39:01 localhost /USR/SBIN/CRON[13835]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Dec 5 08:39:01 localhost /USR/SBIN/CRON[13836]: (root) CMD ( [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm)
Dec 5 09:00:01 localhost /USR/SBIN/CRON[14182]: (list) CMD ([ -x /usr/lib/mailman/cron/disabled ] && /usr/lib/mailman/cron/disabled)
Dec 5 09:09:01 localhost /USR/SBIN/CRON[14312]: (root) CMD ( [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm)
Dec 5 09:09:01 localhost /USR/SBIN/CRON[14314]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Dec 5 09:17:01 localhost /USR/SBIN/CRON[14428]: (root) CMD ( run-parts --report /etc/cron.hourly)
Dec 5 09:39:01 localhost /USR/SBIN/CRON[14703]: (root) CMD ( [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm)
Dec 5 09:39:01 localhost /USR/SBIN/CRON[14705]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Dec 5 10:09:01 localhost /USR/SBIN/CRON[15144]: (root) CMD ( [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm)
Dec 5 10:09:01 localhost /USR/SBIN/CRON[15146]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Dec 5 10:17:01 localhost /USR/SBIN/CRON[15273]: (root) CMD ( run-parts --report /etc/cron.hourly)
Dec 5 10:39:01 localhost /USR/SBIN/CRON[15590]: (root) CMD ( [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm)
Dec 5 10:39:01 localhost /USR/SBIN/CRON[15591]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Dec 5 11:09:01 localhost /USR/SBIN/CRON[15979]: (root) CMD ( [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm)
Dec 5 11:09:01 localhost /USR/SBIN/CRON[15981]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Dec 5 11:17:01 localhost /USR/SBIN/CRON[16093]: (root) CMD ( run-parts --report /etc/cron.hourly)
Dec 5 11:39:01 localhost /USR/SBIN/CRON[16403]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Dec 5 11:39:01 localhost /USR/SBIN/CRON[16401]: (root) CMD ( [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm)
Dec 5 12:00:01 localhost /USR/SBIN/CRON[16734]: (list) CMD ([ -x /usr/lib/mailman/cron/senddigests ] && /usr/lib/mailman/cron/senddigests)
Dec 5 12:09:01 localhost /USR/SBIN/CRON[16851]: (root) CMD ( [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm)
Dec 5 12:09:01 localhost /USR/SBIN/CRON[16852]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Dec 5 12:17:01 localhost /USR/SBIN/CRON[17020]: (root) CMD ( run-parts --report /etc/cron.hourly)
Dec 5 12:39:01 localhost /USR/SBIN/CRON[17344]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Dec 5 12:39:01 localhost /USR/SBIN/CRON[17345]: (root) CMD ( [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm)
Dec 5 13:09:01 localhost /USR/SBIN/CRON[17758]: (root) CMD ( [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm)
Dec 5 13:09:01 localhost /USR/SBIN/CRON[17760]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Dec 5 13:17:01 localhost /USR/SBIN/CRON[17871]: (root) CMD ( run-parts --report /etc/cron.hourly)
Dec 5 13:39:01 localhost /USR/SBIN/CRON[18156]: (root) CMD ( [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm)
Dec 5 13:39:01 localhost /USR/SBIN/CRON[18158]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)

...I could use any help ya'll can offer. I'm lost at this point.

EDIT: running the command manually generated the /stats/ and I now have access to the logs. Am I going to need to do this manually from now on?

falko
6th December 2005, 00:48
We need an excerpt of /var/log/syslog from the time between 0.00h and 4.30h because that's the time where the statistics should be generated.

till
6th December 2005, 12:06
Am I going to need to do this manually from now on?

No. If it works when you execute it manually, then you have still a cron error. Please post an excerpt of the syslog from the timespan where the cronjob is run like falko posted above.

kuyaedz
6th December 2005, 17:15
This is everything from the /var/log/syslog between 00:00h & 04:39h... Thanks again for the help, I hope we can figure something out here.

Dec 6 00:05:36 localhost -- MARK --
Dec 6 00:09:01 localhost /USR/SBIN/CRON[27079]: (root) CMD ( [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm)
Dec 6 00:09:01 localhost /USR/SBIN/CRON[27081]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Dec 6 00:17:01 localhost /USR/SBIN/CRON[27191]: (root) CMD ( run-parts --report /etc/cron.hourly)
Dec 6 00:39:01 localhost /USR/SBIN/CRON[27460]: (root) CMD ( [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm)
Dec 6 00:39:01 localhost /USR/SBIN/CRON[27461]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Dec 6 01:05:37 localhost -- MARK --
Dec 6 01:09:01 localhost /USR/SBIN/CRON[27836]: (root) CMD ( [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm)
Dec 6 01:09:01 localhost /USR/SBIN/CRON[27837]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Dec 6 01:17:01 localhost /USR/SBIN/CRON[27947]: (root) CMD ( run-parts --report /etc/cron.hourly)
Dec 6 01:39:01 localhost /USR/SBIN/CRON[28215]: (root) CMD ( [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm)
Dec 6 01:39:01 localhost /USR/SBIN/CRON[28217]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Dec 6 02:05:37 localhost -- MARK --
Dec 6 02:09:01 localhost /USR/SBIN/CRON[28593]: (root) CMD ( [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm)
Dec 6 02:09:01 localhost /USR/SBIN/CRON[28595]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Dec 6 02:17:01 localhost /USR/SBIN/CRON[28706]: (root) CMD ( run-parts --report /etc/cron.hourly)
Dec 6 02:39:01 localhost /USR/SBIN/CRON[28974]: (root) CMD ( [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm)
Dec 6 02:39:01 localhost /USR/SBIN/CRON[28975]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Dec 6 03:05:37 localhost -- MARK --
Dec 6 03:09:01 localhost /USR/SBIN/CRON[29350]: (root) CMD ( [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm)
Dec 6 03:09:02 localhost /USR/SBIN/CRON[29351]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Dec 6 03:17:01 localhost /USR/SBIN/CRON[29459]: (root) CMD ( run-parts --report /etc/cron.hourly)
Dec 6 03:27:01 localhost /USR/SBIN/CRON[29582]: (list) CMD ([ -x /usr/lib/mailman/cron/nightly_gzip ] && /usr/lib/mailman/cron/nightly_gzip)
Dec 6 03:39:01 localhost /USR/SBIN/CRON[29730]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Dec 6 03:39:01 localhost /USR/SBIN/CRON[29731]: (root) CMD ( [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm)
Dec 6 04:05:37 localhost -- MARK --
Dec 6 04:09:01 localhost /USR/SBIN/CRON[30107]: (root) CMD ( [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm)
Dec 6 04:09:01 localhost /USR/SBIN/CRON[30109]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Dec 6 04:17:01 localhost /USR/SBIN/CRON[30219]: (root) CMD ( run-parts --report /etc/cron.hourly)
Dec 6 04:39:01 localhost /USR/SBIN/CRON[30486]: (root) CMD ( [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm)
Dec 6 04:39:01 localhost /USR/SBIN/CRON[30487]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)

falko
6th December 2005, 17:28
Hm, everything's ok in the log... Can you examine /var/log/messages instead?

kuyaedz
6th December 2005, 17:31
Output of /var/log/messages between 00:00 and 04:45...

Dec 6 00:05:36 localhost -- MARK --
Dec 6 00:25:36 localhost -- MARK --
Dec 6 00:45:36 localhost -- MARK --
Dec 6 01:05:37 localhost -- MARK --
Dec 6 01:25:37 localhost -- MARK --
Dec 6 01:45:37 localhost -- MARK --
Dec 6 02:05:37 localhost -- MARK --
Dec 6 02:25:37 localhost -- MARK --
Dec 6 02:45:37 localhost -- MARK --
Dec 6 03:05:37 localhost -- MARK --
Dec 6 03:25:37 localhost -- MARK --
Dec 6 03:45:37 localhost -- MARK --
Dec 6 04:05:37 localhost -- MARK --
Dec 6 04:25:37 localhost -- MARK --
Dec 6 04:45:37 localhost -- MARK --

falko
6th December 2005, 20:02
When you run crontab -e as root, do you see the webalizer.php and logs.php cron jobs?

kuyaedz
6th December 2005, 20:05
This is my crontab -e...

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


EDIT: running each of these commands manually doesn't seem to return any errors. The stats update. Do you see a reason why these aren't actually getting done on their own?

nenad
11th March 2006, 23:40
I have this error:

/root/ispconfig/php/php /root/ispconfig/scripts/shell/logs.php

Warning: readlink(): Invalid argument in /root/ispconfig/scripts/shell/logs.php on line 125

Warning: readlink(): Invalid argument in /root/ispconfig/scripts/shell/logs.php on line 125

nenad
12th March 2006, 00:46
And I do have 403 Error - Forbidden even with

http://web-hosting-solutions.biz/noc/hello_world.pl

hello_world.pl is perl test script

falko
12th March 2006, 15:45
And I do have 403 Error - Forbidden even with

http://web-hosting-solutions.biz/noc/hello_world.pl

hello_world.pl is perl test script
You must put Perl scripts into the cgi-bin directory.