Opened 3 months ago

Closed 2 months ago

#14435 closed Feature/Enhancement Request (fixed)

AWstats

Reported by: https://id.mayfirst.org/cwadmin Owned by: JaimeV
Priority: Medium Component: Tech
Keywords: AWstats, logging Cc: Jamie McClelland
Sensitive: no

Description (last modified by https://id.mayfirst.org/cwadmin)

We would like to set up AWstats for corporatewatch.org in order to hopefully reduce dependence on random wordpress plugins to have some idea how many users read our posts and from where they are reading. Is this something you could enable for us?

As AWstats reads apache logs to create statistics does this mean that the logging mode in the webconfig for our hosting order needs to be set to "Access and error" rather than "Error logging only"? Is it possible then to configure log rotation so that after AWstats has produced useful statistics these can be exported and logs can be deleted from the server?

Change History (11)

comment:1 Changed 3 months ago by https://id.mayfirst.org/cwadmin

Description: modified (diff)

comment:2 Changed 2 months ago by https://id.mayfirst.org/cwadmin

I just wanted to check if there was any progress on this ticket. Thanks.

comment:3 Changed 2 months ago by JaimeV

Cc: Jamie McClelland added
Owner: set to JaimeV
Status: newassigned

Hi, very sorry I haven't gotten back to you earlier. Yes you would have to enable apache access logs for AWstats to function properly. Our default configuration rotates the logs for all hosting orders regularly but I think it should be possible to setup a special cron job or systemd timer on slaapbeen to run logrotate with your specific preferences for this folder. Log files are owned by the root user so it would be necessary for us to set this up for you I believe.

Copying jamie for his input.

comment:4 Changed 2 months ago by Jamie McClelland

By default the apache logs are purged every 4 weeks. Is that soon enough?

If not we can make an exception on slaapbeen but I'm always a bit heistant since we can't guarantee this will stay in place if we ever have to move your site, upgrade the server, etc.

comment:5 Changed 2 months ago by https://id.mayfirst.org/cwadmin

I would say let's try AWstats out with the default 4-week log retention time. I will speak to the collective and see if they would like that time reduced but in the mean time let's see if AWstats suits our needs with the data it presents. I have enabled access and error logging in the web configuration for "cwtemp.org". Could you enable the AWstats please?

comment:6 Changed 2 months ago by JaimeV

Ok, I've setup awstats https://support.mayfirst.org/wiki/setup_awstats and the setup script is currently generating initial stats. You should receive the login vi mail. It may be necessary to do some additional configuration. I see it attempting to create stats for cwtemp.org

comment:7 Changed 2 months ago by https://id.mayfirst.org/cwadmin

Seems I can log in to the stats interface but there's no data in there yet. I've also received an error email at approximately 10mins and 1second past each hour since the last comment saying Invalid Date:

From: root@slaapbeen.mayfirst.org (Cron Daemon)
To: cwadmin@slaapbeen.mayfirst.org
Subject: Cron <cwadmin@slaapbeen> /usr/local/sbin/mf-awstats-build-staticpages cwtemp.org /home/members/cwatch/sites/cwtemp.org/.red/awstats/web/ >/dev/null
Date: Tue, 12 Feb 2019 12:10:47 -0500 (EST)

date: invalid date ‘Tue 12 Feb 11:10:01 EST 2019’
date: invalid date ‘Tue 12 Feb 11:10:01 EST 2019’
From: root@slaapbeen.mayfirst.org (Cron Daemon)
To: cwadmin@slaapbeen.mayfirst.org
Subject: Cron <cwadmin@slaapbeen> /usr/local/sbin/mf-awstats-build-staticpages cwtemp.org /home/members/cwatch/sites/cwtemp.org/.red/awstats/web/ >/dev/null
Date: Tue, 12 Feb 2019 13:12:01 -0500 (EST)

date: invalid date ‘Tue 12 Feb 12:10:01 EST 2019’
date: invalid date ‘Tue 12 Feb 12:10:01 EST 2019’
From: root@slaapbeen.mayfirst.org (Cron Daemon)
To: cwadmin@slaapbeen.mayfirst.org
Subject: Cron <cwadmin@slaapbeen> /usr/local/sbin/mf-awstats-build-staticpages cwtemp.org /home/members/cwatch/sites/cwtemp.org/.red/awstats/web/ >/dev/null
Date: Tue, 12 Feb 2019 14:13:44 -0500 (EST)

date: invalid date ‘Tue 12 Feb 13:10:01 EST 2019’
date: invalid date ‘Tue 12 Feb 13:10:01 EST 2019’
From: root@slaapbeen.mayfirst.org (Cron Daemon)
To: cwadmin@slaapbeen.mayfirst.org
Subject: Cron <cwadmin@slaapbeen> /usr/local/sbin/mf-awstats-build-staticpages cwtemp.org /home/members/cwatch/sites/cwtemp.org/.red/awstats/web/ >/dev/null
Date: Tue, 12 Feb 2019 15:11:04 -0500 (EST)

date: invalid date ‘Tue 12 Feb 14:10:01 EST 2019’
date: invalid date ‘Tue 12 Feb 14:10:01 EST 2019’
From: root@slaapbeen.mayfirst.org (Cron Daemon)
To: cwadmin@slaapbeen.mayfirst.org
Subject: Cron <cwadmin@slaapbeen> /usr/local/sbin/mf-awstats-build-staticpages cwtemp.org /home/members/cwatch/sites/cwtemp.org/.red/awstats/web/ >/dev/null
Date: Tue, 12 Feb 2019 16:11:30 -0500 (EST)

date: invalid date ‘Tue 12 Feb 15:10:02 EST 2019’
date: invalid date ‘Tue 12 Feb 15:10:02 EST 2019’

Is it likely the backupbuddy folder as mentioned here https://support.mayfirst.org/ticket/14440#comment:3 is causing it to be so slow? I haven't got round to sorting that out yet but I guess I should as soon as possible.

comment:8 Changed 2 months ago by Jamie McClelland

I just fixed the invalid date error - so we shouldn't be getting those problems.

And, I think it is genertaing some data now - or so it seems to me.

comment:9 Changed 2 months ago by https://id.mayfirst.org/cwadmin

Great, seems to be working well now. Thanks a lot.

Is it possible to either allow other users access to the stats interface on their own MF user names or change the username used to login to something generic instead of cwadmin? (Just to avoid confusion, cwstats for example).

comment:10 Changed 2 months ago by Jamie McClelland

Resolution: fixed
Status: assignedfeedback

It is not possible to use the control panel username since this setup uses a standard .htaccess file. Typically it is root owned so only we can change it, but I just chown'ed yours so it is owned by the cwadmin user. Now you can add/delete/modify users with:

htpasswd /home/members/cwatch/sites/cwtemp.org/.htpasswd <username>\

comment:11 Changed 2 months ago by https://id.mayfirst.org/cwadmin

Status: feedbackclosed

Brilliant, thanks a bunch.

Please login to add comments to this ticket.

Note: See TracTickets for help on using tickets.