Skip to content

Instantly share code, notes, and snippets.

@kbaum
Created June 23, 2011 12:57
Show Gist options
  • Save kbaum/1042485 to your computer and use it in GitHub Desktop.
Save kbaum/1042485 to your computer and use it in GitHub Desktop.
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
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