Created
June 23, 2011 12:57
-
-
Save kbaum/1042485 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'rest-client' | |
require 'yaml' | |
config = YAML::load(File.read('/usr/lib/elasticsearch/config/elasticsearch.yml')) | |
config['discovery']['zen']['ping']['unicast']['hosts'].split(', ').collect{|h| h.sub(':9300', '') }.each do |host| | |
puts RestClient.get("http://#{host}:9200/_cluster/health").inspect | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
path: | |
work: /var/lib/elasticsearch/work | |
logs: /var/log/elasticsearch | |
data: /var/lib/elasticsearch/data | |
cluster: | |
name: mycluster | |
discovery: | |
zen: | |
ping: | |
multicast: | |
enabled: false | |
unicast: | |
enabled: true | |
hosts: host1:9300, host2:9300, host3:9300, host4:9300, host5:9300 | |
index: | |
number_of_shards: 6 | |
number_of_replicas: 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment