Ottomata has submitted this change and it was merged.

Change subject: Mail webrequest partition status summaries to analytics ops
......................................................................


Mail webrequest partition status summaries to analytics ops

Change-Id: Ieb575dceb491bb0e36f8dd113830f9e98faefe42
---
M manifests/role/analytics/refinery.pp
M manifests/site.pp
2 files changed, 34 insertions(+), 3 deletions(-)

Approvals:
  Ottomata: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/manifests/role/analytics/refinery.pp 
b/manifests/role/analytics/refinery.pp
index c7f8f8e..42f502e 100644
--- a/manifests/role/analytics/refinery.pp
+++ b/manifests/role/analytics/refinery.pp
@@ -82,7 +82,7 @@
     }
 }
 
-# == Class role::analytics::refinery::data::check
+# == Class role::analytics::refinery::data::check::icinga
 # Configures passive/freshness icinga checks or data imports
 # in HDFS.
 #
@@ -97,7 +97,7 @@
 # See: https://phabricator.wikimedia.org/T76414
 #      https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=670373
 #
-class role::analytics::refinery::data::check {
+class role::analytics::refinery::data::check::icinga {
     # We are monitoring hourly datasets.
     # Give Oozie a little time to finish running
     # the monitor_done_flag workflow for each hour.
@@ -144,3 +144,30 @@
         retries         => 1,
     }
 }
+
+# == Class role::analytics::refinery::data::check::email
+# Configures cron jobs that send email about the faultyness of webrequest data
+#
+# These checks walk HDFS through the plain file system.
+#
+class role::analytics::refinery::data::check::email {
+    require role::analytics::refinery
+
+    # This should not be hardcoded.  Instead, one should be able to use
+    # $::cdh::hadoop::mount::mount_point to reference the user supplied
+    # parameter when the cdh::hadoop::mount class is evaluated.
+    # I am not sure why this is not working.
+    $hdfs_mount_point = '/mnt/hdfs'
+
+    # Since the 'stats' user is not in ldap, it is unnecessarily hard
+    # to grant it access to the private data in hdfs. As discussed in
+    #   https://gerrit.wikimedia.org/r/#/c/186254
+    # the cron runs as hdfs instead.
+    cron { 'refinery data check hdfs_mount':
+        command     => 
"${::role::analytics::refinery::path}/bin/refinery-dump-status-webrequest-partitions
 --hdfs-mount ${hdfs_mount_point} --quiet",
+        environment => '[email protected],[email protected]',
+        user        => 'hdfs',
+        hour        => 10,
+        minute      => 0,
+    }
+}
diff --git a/manifests/site.pp b/manifests/site.pp
index 109341a..92a0271 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -299,7 +299,7 @@
     # These are passive checks, so if
     # icinga is not notified of a successful import
     # hourly, icinga should generate an alert.
-    include role::analytics::refinery::data::check
+    include role::analytics::refinery::data::check::icinga
 }
 
 
@@ -2267,6 +2267,10 @@
     # to public data generated by the Analytics Cluster.
     include role::analytics::rsyncd
 
+    # Include analytics/refinery checks that send email about
+    # webrequest partitions faultyness.
+    include role::analytics::refinery::data::check::email
+
     # Include the MySQL research password at
     # /etc/mysql/conf.d/analytics-research-client.cnf
     # and only readable by users in the

-- 
To view, visit https://gerrit.wikimedia.org/r/185442
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieb575dceb491bb0e36f8dd113830f9e98faefe42
Gerrit-PatchSet: 8
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: QChris <[email protected]>
Gerrit-Reviewer: Gage <[email protected]>
Gerrit-Reviewer: Ottomata <[email protected]>
Gerrit-Reviewer: QChris <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to