Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/statsmaster/manifests/awstats.pp

Issue 5667089633247232: Issue 479 - Make AWStats produce daily reports as well (Closed)
Patch Set: Created June 24, 2014, 6:08 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | modules/statsmaster/templates/awstats.conf » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/statsmaster/manifests/awstats.pp
===================================================================
--- a/modules/statsmaster/manifests/awstats.pp
+++ b/modules/statsmaster/manifests/awstats.pp
@@ -1,12 +1,14 @@
class statsmaster::awstats {
package {['awstats', 'libgeo-ip-perl']:}
- file {['/var/www/awstatsdata', '/var/www/awstatsconf', '/var/www/awstats']:
+ file {['/var/www/awstatsdata', '/var/www/awstatsdatadaily',
+ '/var/www/awstatsconf', '/var/www/awstats',
+ '/var/www/awstats/archive', '/var/www/awstats/daily']:
ensure => directory,
owner => root,
mode => 0755,
}
file {'/etc/cron.d/awstats':
# AWStats package thinks that running AWStats without proper configuration
# every 10 minutes is a good idea.
@@ -57,18 +59,19 @@ class statsmaster::awstats {
define siteconfig($host, $log) {
file {"/var/www/awstatsconf/awstats.$title.conf":
ensure => present,
mode => 0444,
owner => root,
content => template('statsmaster/awstats.conf'),
}
- file {["/var/www/awstatsdata/$title", "/var/www/awstats/$title",
- "/var/www/awstats/archive/$title"]:
+ file {["/var/www/awstatsdata/$title", "/var/www/awstatsdatadaily/$title",
+ "/var/www/awstats/$title", "/var/www/awstats/archive/$title",
+ "/var/www/awstats/daily/$title"]:
ensure => directory,
mode => 0755,
owner => stats,
}
concat::fragment {"index_$title":
target => '/var/www/awstats/index.html',
content => template('statsmaster/index_item.html.erb'),
@@ -126,36 +129,46 @@ class statsmaster::awstats {
'intraforum.adblockplus.org' => {
host => 'server_10.adblockplus.org',
log => 'access_log_intraforum',
},
}
create_resources(statsmaster::awstats::siteconfig, $sites)
+ #
+ # IMPORTANT: This will only work correctly if the following bugs are fixed
+ # in your AWStats instance (might require manual patching):
+ #
+ # * https://sourceforge.net/p/awstats/bugs/873/
+ # * https://sourceforge.net/p/awstats/bugs/929/
+ #
+
cron {'awstats_update':
ensure => present,
require => [
Package['awstats', 'libgeo-ip-perl'],
File['/home/stats/process_logs', '/home/stats/build_static',
- '/var/www/awstatsconf', '/var/www/awstatsdata', '/var/www/awstats'],
+ '/var/www/awstatsdata', '/var/www/awstatsdatadaily',
+ '/var/www/awstats', '/var/www/awstatsconf'],
],
command => '/home/stats/process_logs && /home/stats/build_static',
environment => ['MAILTO=admins@adblockplus.org,root'],
user => stats,
hour => 4,
minute => 0,
}
cron {'awstats_prevmonth':
ensure => present,
require => [
Package['awstats'],
File['/home/stats/build_static', '/home/stats/anonymize_ips',
- '/var/www/awstatsconf', '/var/www/awstatsdata', '/var/www/awstats'],
+ '/var/www/awstatsdata', '/var/www/awstatsdatadaily',
+ '/var/www/awstatsconf', '/var/www/awstats'],
],
command => '/home/stats/anonymize_ips prevmonth && /home/stats/build_static prevmonth',
environment => ['MAILTO=admins@adblockplus.org,root'],
user => stats,
monthday => 1,
hour => 6,
minute => 0,
}
« no previous file with comments | « no previous file | modules/statsmaster/templates/awstats.conf » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld