Koozali.org: home of the SME Server

Configure AWSTATS for domino logs

Offline jonroberts

  • ****
  • 111
  • +0/-0
    • http://www.westcountrybusiness.com
Configure AWSTATS for domino logs
« on: May 09, 2009, 03:40:57 PM »
I'm trying to use AWStats on my SME server to report web stats for sites hosted on my Lotus Domino Server.  For the purpose of this example, say I want AWStats for a website www.mysite.com that is hosted on my domino server.

I'm able to set up a cron job to copy the Domino log files from the remote server to the SME server each night so they will be local to the SME Server.

I have creating an Ibay called mysite and created a local domain of mysite.com that directs to this Ibay.  I did this to register the domain in the AWStats panel in server manager, but not sure if this step is needed.

This created the following two awstats config files:
/etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.mysite.com.conf
/home/e-smith/files/users/admin/home/awstats/mysite.com

I then changed the LogFile entry to point to the location of the Domino logfiles:
LogFile=" /home/e-smith/files/ibays/mysite/files/logs"

I also tried the following, which I found in a Domino HowTo.  Not sure if it's correct:
LogFile="perl ./logresolvemerge.pl d:/domino/weblogs/access*.log |"

However, when I go back to the AWStats ServerManager panel and make any changes, these files are overwritten.  OK that's to be expected, but I can't find where the templates are for these.  I don't want to change the LogFile= line for all AWStats conf files as some sites are hosted on the SME server and I want AWStats to work for them too.

So, should I remove the mysite IBAY and configure AWStats manually?  If so, where do I place the conf file and ensure AWStats finds it?

Or should I continue to use the IBAY approach and, if so, how do I prevent the LogFile= line being overwritten.

Any help much appreciated.

......

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Configure AWSTATS for domino logs
« Reply #1 on: May 09, 2009, 07:26:36 PM »
Any help much appreciated.
Perhaps this might get you started:
http://www.nsftools.com/tips/UsingAwstatsWithDomino.htm
http://awstats.sourceforge.net/docs/awstats_faq.html (Search for Domino and compare your logformat with the suggestions)

Templates location can be found like this:
Code: [Select]
rpm -ql smeserver-awstats | grep template
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline jonroberts

  • ****
  • 111
  • +0/-0
    • http://www.westcountrybusiness.com
Re: Configure AWSTATS for domino logs
« Reply #2 on: May 11, 2009, 03:50:54 PM »
Cactus - thanks for the help.  I think I've found a solution now.

The domino how-to link you posted was the guide I was working to, but couldn't prevent SME rewriting the config files.  Here's what I've done (in case anyone is ever interested or, more likely, I need to refer back).

I removed the domain that I had created on the SME server.  I also needed to remove the config file that had been created at /etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.mysite.com.conf and the working directory /home/e-smith/files/users/admin/home/awstats/mysite.com

Simply deleting the domain did not stop the SME from automatically creating / rewriting the awstats.mysite.com.conf file.  I needed to remove the /home/e-smith/files/users/admin/home/awstats/mysite.com folder too.  It seems the awstats on SME uses these folders to determine which conf files it controls and so should recreate.

As the site I am trying to produce stats for is on another server, I created an IBAY for 'web-stats'.  Under the cgi-bin folder I copied /etc/e-smith/web/panels/manager/cgi-bin/.awstats/ (and all it contained).  I then needed to adjust file permissions accordingly to make these files accessible / executable through the IBAY.

I have an automatic job to copy the web log files from the Domino server to the SME server and I manually edited the awstats.mysite.com.conf file to read from this location.  I also needed to change the working dir for awstats somewhere away from  /home/e-smith/files/users/admin/home/awstats (for write access & to prevent SME thinking it needed to rebuild this conf file).

I created the stats with awstats.pl -config=mysite.com -update and access the stats at http://smeserver/web-stats/cgi-bin/.awstats/awstats.pl?config=mysite.com.

Just need to add a cron job to schedule the update & I think I'm nearly there ...

To add stats for other sites hosted on my domino server, I should just need to copy the awstats.mysite.com.conf file, edit as required and add this site to the update cron job (probably ...)


......