Milimetric has uploaded a new change for review.
https://gerrit.wikimedia.org/r/54102
Change subject: stat1 cron job that emails out aggregate pageviews
......................................................................
stat1 cron job that emails out aggregate pageviews
Change-Id: Id36bc8a6de648c91fa594469298b49a04a4ddcd7
---
M manifests/misc/statistics.pp
M manifests/site.pp
2 files changed, 28 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/02/54102/1
diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp
index 0ced104..274a124 100644
--- a/manifests/misc/statistics.pp
+++ b/manifests/misc/statistics.pp
@@ -669,3 +669,29 @@
minute => 0,
}
}
+
+
+# Class: misc::statistics::cron_blog_pageviews
+#
+# Sets up daily cron jobs to run a script which
+# groups blog pageviews by url and emails them
+class misc::statistics::cron_blog_pageviews {
+ file {
+ "/home/dandreescu/blog.sh":
+ mode => 0755,
+ content => template("misc/email-blog-pageviews.erb");
+ "/home/dandreescu/blog_cron_output":
+ ensure => "directory",
+ mode => 0755;
+ }
+
+ # Create a daily cron job to run the blog script
+ # This requires that the $misc::statistics::user::username
+ # user is installed on the source host.
+ cron { "rsync_${name}_logs":
+ command => "/home/dandreescu/blog.sh",
+ user => "$misc::statistics::user::username",
+ hour => 8,
+ minute => 0,
+ }
+}
diff --git a/manifests/site.pp b/manifests/site.pp
index 4dc3fc5..436f6c7 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2369,6 +2369,8 @@
sudo_user { "otto": privileges => ['ALL = NOPASSWD: ALL'] }
+
+ include misc::statistics::cron_blog_pageviews
}
node "stat1001.wikimedia.org" {
--
To view, visit https://gerrit.wikimedia.org/r/54102
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id36bc8a6de648c91fa594469298b49a04a4ddcd7
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Milimetric <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits