JanZerebecki has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/157863

Change subject: Add icinga check for wikidata dispatch lag
......................................................................

Add icinga check for wikidata dispatch lag

Bug 65291

Change-Id: Iac540d1b47df398e0fc92f2b843a3b618d1844d5
---
M manifests/misc/icinga.pp
M templates/icinga/checkcommands.cfg.erb
2 files changed, 20 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/63/157863/1

diff --git a/manifests/misc/icinga.pp b/manifests/misc/icinga.pp
index 6ab0ffb..92f243e 100644
--- a/manifests/misc/icinga.pp
+++ b/manifests/misc/icinga.pp
@@ -40,6 +40,7 @@
     include icinga::monitor::packages
     include icinga::monitor::service
     include icinga::monitor::snmp
+    include icinga::monitoring::wikidata
     include icinga::user
     include lvs::monitor
     include misc::dsh::files
@@ -869,6 +870,20 @@
 
 }
 
+class icinga::monitoring::wikidata {
+    monitor_host { 'wikidata':
+        ip_address => '91.198.174.192',
+    }
+
+    monitor_service { 'wikidata.org dispatch lag':
+        description   => 'check if wikidata.org dispatch lag is higher than 2 
minutes',
+        check_command => 
'check_https_url_for_regexp!www.wikidata.org!/w/api.php?action=query&meta=siteinfo&format=json&siprop=statistics!"median":{[^}]*"lag":[1-5]?[0-9]',
+        host          => 'wikidata',
+        normal_check_interval => 30,
+        retry_check_interval => 5,
+    }
+}
+
 # == Class icinga::ganglia::check
 #
 # Installs check_ganglia package and sets up symlink into
diff --git a/templates/icinga/checkcommands.cfg.erb 
b/templates/icinga/checkcommands.cfg.erb
index 3fd7044..5f73543 100644
--- a/templates/icinga/checkcommands.cfg.erb
+++ b/templates/icinga/checkcommands.cfg.erb
@@ -296,6 +296,11 @@
     }
 
 define command{
+    command_name    check_https_url_for_regexp
+    command_line    $USER1$/check_http -H $ARG1$ -I $HOSTADDRESS$ -S -u $ARG2$ 
--linespan --ereg $ARG3$
+    }
+
+define command{
     command_name    check_http_url
     command_line    $USER1$/check_http -H $ARG1$ -I $HOSTADDRESS$ -u $ARG2$
     }

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

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

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

Reply via email to