MaxSem has uploaded a new change for review.

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


Change subject: Changes forgotten in https://gerrit.wikimedia.org/r/#/c/49372/
......................................................................

Changes forgotten in https://gerrit.wikimedia.org/r/#/c/49372/

Change-Id: I3ef0347e3b19aeb84ba9583a1f2d0aff703e8997
---
M manifests/role/solr.pp
1 file changed, 8 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/43/49843/1

diff --git a/manifests/role/solr.pp b/manifests/role/solr.pp
index 8038d57..e4f77e4 100644
--- a/manifests/role/solr.pp
+++ b/manifests/role/solr.pp
@@ -6,27 +6,20 @@
 #
 # $schema::             Schema file for Solr (only one schema per instance 
supported)
 # $replication_master:: Replication master, if this is current hostname, this 
server will be a master
-# $monitor::            How to monitor this server:
-#                       * "service" - just presence of Solr
-#                       * "results" - whether Solr has some data in its index
-#                       Any other input will disable monitoring
-class role::solr($schema = undef, $replication_master = undef, $monitor = 
"service" ) {
+class role::solr($schema = undef, $replication_master = undef ) {
        class { "::solr":
                schema => $schema,
                replication_master => $replication_master,
        }
 
-       if ($monitor == "service") {
-               monitor_service { "Solr":
-                       description => "Solr",
-                       check_command => 
"check_http_url_on_port!$::hostname!8983!200!/solr/select/?q=*%3A*\&start=0\&rows=1\&indent=on"
-               }
+       if ($replication_master) {
+               $check_command = "check_solr"
+       } else {
+               $check_command = "check_replicated_solr"
        }
-       elsif ($monitor == "results") {
-               monitor_service { "Solr":
-                       description => "Solr (with a result set check)",
-                       check_command => 
"check_http_url_for_string_on_port!$::hostname!8983!'<str 
name=\"rows\">1</str>'!/solr/select/?q=*%3A*\&start=0\&rows=1\&indent=on"
-               }
+       monitor_service { "Solr":
+               description => "Solr",
+               check_command => "$check_command!$::hostname!400:600!5",
        }
 }
 

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

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

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

Reply via email to