Phuedx has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/350377 )

Change subject: Reading Web Page Previews alerts
......................................................................

Reading Web Page Previews alerts

Use the Nagios Grafana alerts adapter introduced in Ieb902f45 to notify
the Reading Web team of any graphs that are alerting.

Change-Id: I1254d3f5b15898cf89e3d4d85bb444f08ab94ca8
---
M modules/icinga/manifests/ircbot.pp
A modules/icinga/manifests/monitor/reading_web.pp
M modules/nagios_common/files/contactgroups.cfg
M modules/nagios_common/templates/notification_commands.cfg.erb
M modules/role/manifests/icinga.pp
5 files changed, 27 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/77/350377/1

diff --git a/modules/icinga/manifests/ircbot.pp 
b/modules/icinga/manifests/ircbot.pp
index 3a8844f..efc6624 100644
--- a/modules/icinga/manifests/ircbot.pp
+++ b/modules/icinga/manifests/ircbot.pp
@@ -15,6 +15,7 @@
             '/var/log/icinga/irc-interactive.log' => '#wikimedia-interactive',
             '/var/log/icinga/irc-performance.log' => '#wikimedia-perf-bots',
             '/var/log/icinga/irc-fundraising.log' => '#wikimedia-fundraising',
+            '/var/log/icinga/irc-reading-web.log' => 
'#wikimedia-reading-web-bots',
         }
         $ircecho_nick   = 'icinga-wm'
         $ircecho_server = 'chat.freenode.net'
diff --git a/modules/icinga/manifests/monitor/reading_web.pp 
b/modules/icinga/manifests/monitor/reading_web.pp
new file mode 100644
index 0000000..4cd1edc
--- /dev/null
+++ b/modules/icinga/manifests/monitor/reading_web.pp
@@ -0,0 +1,10 @@
+# == Class: icinga::monitor::reading_web
+#
+# Monitor the following Reading Web Grafana dashboards:
+#
+# * Page Previews Dashboard 
<grafana.wikimedia.org/dashboard/db/reading-web-page-previews>
+class icinga::monitor::reading_web {
+    monitoring::grafana_alert { 'db/reading-web-page-previews':
+        contact_group => 'team-reading-web',
+    }
+}
diff --git a/modules/nagios_common/files/contactgroups.cfg 
b/modules/nagios_common/files/contactgroups.cfg
index 1474a45..fbefc9b 100644
--- a/modules/nagios_common/files/contactgroups.cfg
+++ b/modules/nagios_common/files/contactgroups.cfg
@@ -101,3 +101,7 @@
     members                 
irc-performance,team-performance,gilles,aaron,krinkle,phedenskog
 }
 
+define contactgroup {
+    contactgroup_name       team-reading-web
+    members                 
irc-reading-web,phuedx,jhernandez,jrobson,bmansurov,pmiazga,sniedzielski
+}
diff --git a/modules/nagios_common/templates/notification_commands.cfg.erb 
b/modules/nagios_common/templates/notification_commands.cfg.erb
index 1b09e4b..61eb75e 100644
--- a/modules/nagios_common/templates/notification_commands.cfg.erb
+++ b/modules/nagios_common/templates/notification_commands.cfg.erb
@@ -166,3 +166,14 @@
        command_name    notify-service-by-irc-fundraising
        command_line    echo "$NOTIFICATIONTYPE$ - $SERVICEDESC$ on $HOSTNAME$ 
is $SERVICESTATE$: $SERVICEOUTPUT$ $SERVICEACKAUTHOR$ $SERVICEACKCOMMENT$" >> 
<%= @irc_dir_path %>/irc-fundraising.log
        }
+
+# IRC output for Reading Web
+define command{
+       command_name    notify-host-by-irc-reading-web
+       command_line    echo "$NOTIFICATIONTYPE$ - Host $HOSTALIAS$ is 
$HOSTSTATE$: $HOSTOUTPUT$ $HOSTACKAUTHOR$ $HOSTACKCOMMENT$" >> <%= 
@irc_dir_path %>/irc-reading-web.log
+       }
+
+define command{
+       command_name    notify-service-by-irc-reading-web
+       command_line    echo "$NOTIFICATIONTYPE$ - $SERVICEDESC$ on $HOSTNAME$ 
is $SERVICESTATE$: $SERVICEOUTPUT$ $SERVICEACKAUTHOR$ $SERVICEACKCOMMENT$" >> 
<%= @irc_dir_path %>/irc-reading-web.log
+       }
diff --git a/modules/role/manifests/icinga.pp b/modules/role/manifests/icinga.pp
index b1d0fbe..92ae9e7 100644
--- a/modules/role/manifests/icinga.pp
+++ b/modules/role/manifests/icinga.pp
@@ -22,6 +22,7 @@
     include icinga::monitor::elasticsearch
     include icinga::monitor::wdqs
     include icinga::monitor::performance
+    include icinga::monitor::reading_web
     include icinga::event_handlers::raid
 
     include role::authdns::monitoring

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1254d3f5b15898cf89e3d4d85bb444f08ab94ca8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Phuedx <[email protected]>

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

Reply via email to