Doing a quick MBean Healthcheck

So here are a couple of scripts which can gather the Mbean information from your servers so you can analyze it a little further and check on it's general health. Right now it is configured to look at your handlers, your caches and information about the searcher. There is one script for standalone and one script for cloud.

For cloud, this program will gather the relevant MBean statistics of each collection, to shards to replicas.... IE: every core on every system in your cloud. For standalone right now it just goes to the single server you gave as the base_url and any collections you told it to look at. 

If you don't have ruby installed with the proper libraries you can just use jruby-complete and do a java -jar on the script. In that case you will need four files, and depending on whether you are doing cloud or standalone, you will want to accompanying script. All files are attached to this article.

* jruby-complete-1.7.4.jar, ruby-gems.jar, analyze_cloud.rb, analyze_standalone.rb, properties.yml

You will put all four files in the same directory. The only requirement is the presence of java being able to execute jruby-complete-1.7.4.jar. It should just require java, but jruby-complete-1.7.4.jar may need a certain version.

The usage is as thus (first for cloud):

java -jar jruby-complete-1.7.4.jar -r./ruby-gems.jar analyze_cloud.rb <zkHost>:<zkPort> properties.yml

Then for standalone:

java -jar jruby-complete-1.7.4.jar -r./ruby-gems.jar analyze_standalone.rb <solr_base_usr> <collection1> <collection2>...

There are usage statements with the programs. 

The properties.yml file can be used to specify which MBeans you want and what statistics you want from the mbean. The required files are attached to the article. Give feedback as to how it works for you!

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk