Change Request: AWStats on log1

Ricky Zhou ricky at fedoraproject.org
Tue Nov 11 20:51:01 UTC 2008


AWStats has been going crazy on log1, so I'd like to make the cronjob
run less often, and on far fewer log files:

diff --git a/modules/awstats/manifests/site.pp b/modules/awstats/manifests/site.pp
index 4df7974..6cb2944 100644
--- a/modules/awstats/manifests/site.pp
+++ b/modules/awstats/manifests/site.pp
@@ -1,5 +1,5 @@
 define awstats::site($log_dir="proxy*", $record_redirects=false, $record_query_string=false) {
-    file { "/etc/cron.hourly/awstats.$name":
+    file { "/etc/cron.daily/awstats.$name":
         mode => 0755,
         content => template('awstats/awstats.cron.erb'),
     }
diff --git a/modules/awstats/templates/awstats.conf.erb b/modules/awstats/templates/awstats.conf.erb
index 66d2a66..931cbeb 100644
--- a/modules/awstats/templates/awstats.conf.erb
+++ b/modules/awstats/templates/awstats.conf.erb
@@ -1,4 +1,4 @@
-LogFile="/usr/share/awstats/tools/logresolvemerge.pl /var/log/hosts/<%= log_dir %>/*/*/*/http/<%= name %>-access.log |"
+LogFile="/usr/share/awstats/tools/logresolvemerge.pl /var/log/hosts/<%= log_dir %>/%YYYY-24/%MM-24/%DD-24/http/<%= name %>-access.log |"
 LogType=W
 LogFormat=1
 LogSeparator=" "

Can I get two +1s for this?

Thanks,
Ricky
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/infrastructure/attachments/20081111/fcdd4cd9/attachment.bin 


More information about the infrastructure mailing list