Dzahn has submitted this change and it was merged.

Change subject: monitoring lucene search boxes
......................................................................


monitoring lucene search boxes

Lucene search has a build in status report which can be accessed on
http://localhost:8123/status . Whenever an index has an issue it will
report FAILED, so we just have to look up for absence of that string
using check_http.

Tested on the beta instance:

 $ ./check_http  -H 127.0.0.1 -p 8123 -url=/status  --regex FAILED
--invert-regex
 HTTP CRITICAL: HTTP/1.1 200 OK - pattern found - 167799 bytes in 0.054
second response time |time=0.054401s;;;0.000000 size=167799B;;;0
 $

In production there are a few issues but the plugin seems to work fine
on all search servers.

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

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



diff --git a/manifests/search.pp b/manifests/search.pp
index 6f281c1..cf498c1 100644
--- a/manifests/search.pp
+++ b/manifests/search.pp
@@ -120,6 +120,8 @@
 
                if $lucene::server::indexer == false {
                        monitor_service { "lucene": description => "Lucene", 
check_command => "check_lucene", retries => 6 }
+
+                       monitor_service { 'lucene_search': description => 
'Lucene search', check_command => "check_lucene_frontend" }
                }
        }
 
diff --git a/templates/icinga/checkcommands.cfg.erb 
b/templates/icinga/checkcommands.cfg.erb
index 820163c..80b75e2 100644
--- a/templates/icinga/checkcommands.cfg.erb
+++ b/templates/icinga/checkcommands.cfg.erb
@@ -189,6 +189,12 @@
         command_line    $USER1$/check_tcp -t 90 -w 10 -p 8123 -H $HOSTADDRESS$
         }
 
+# Http query on a Lucene search box
+# /status would contains FAILED whenever some index has an issue.
+define command{
+       command_name    check_lucene_frontend
+       command_line    /usr/lib/nagios/plugins/check_http -H '$HOSTADDRESS$' 
-p 8123 -url='/status' --regex FAILED --invert-regex
+       }
 
 define command {
        command_name    check_bgpstate

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I27516dc613a4b2f433ce156ba697c26ad4fe28f0
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: Dzahn <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Lcarr <[email protected]>
Gerrit-Reviewer: Pyoungmeister <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to