0

I'm trying to setup awstats with our current log naming schema. Our logs are named like /var/log/webservers/web07/2012-10/site.com/29-www and all of the numbers are changed via cronolog. The problem is that there is more than just 29-www. We also have things like 29-admin. I would like to combine all of these DD-* logs with awstats. I have tried LogFile="/var/awstats/tools/logresolvemerge.pl /var/log/webservers/web07/%YYYY-%MM/site.com/%DD-*" but I'm getting this error:

Error: Couldn't open server log file "/var/awstats/tools/logresolvemerge.pl /var/log/webservers/web07/2012-10/site.com/29-*" : No such file or directory

So it looks like it's converting the symbols into the correct numbers. Anyone see what I'm doing wrong here?

Also, I can successfully merge these files myself from the command line by doing perl logresolvemerge.pl /var/log/webservers/web07/2012-10/site.com/29-* > newlog

6
  • Some questions: is that path to logresolvemerge.pl correct? Is it executable? Is the shebang line correct? Are the log files readable by the user that AWStats runs as?
    – Ladadadada
    Oct 29, 2012 at 15:22
  • Yes yes, how would I tell?, and yes
    – nwalke
    Oct 29, 2012 at 15:27
  • The first line is probably #!/usr/bin/perl. That path should go to your perl installation.
    – Ladadadada
    Oct 29, 2012 at 15:39
  • When I issue the command myself it works just fine. Are you saying I need to do LogFile="perl /pathtoawstatstools/logresolvemerge.pl ... ?
    – nwalke
    Oct 29, 2012 at 15:44
  • No, not if the shebang is correct. I'm just asking questions to try to narrow down the cause of the error. If I know the answer, I'll write one.
    – Ladadadada
    Oct 29, 2012 at 15:48

1 Answer 1

1

The correct usage does include the pipe at the end. But awstats doesn't like the * at the end because it expects a number there as shown in the documentation. For example: LogFile="/var/awstats/tools/logresolvemerge.pl /var/log/webservers/web07/%YYYY-%MM/site.com/%DD-0-* |"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .