bin/metrics-es-cluster.rb in sensu-plugins-elasticsearch-0.0.2 vs bin/metrics-es-cluster.rb in sensu-plugins-elasticsearch-0.1.0
- old
+ new
@@ -66,10 +66,10 @@
info = get_es_resource('/')
info['version']['number']
end
def get_es_resource(resource)
- r = RestClient::Resource.new("http://#{config[:host]}:#{config[:port]}/#{resource}", timeout: config[:timeout])
+ r = RestClient::Resource.new("http://#{config[:host]}:#{config[:port]}#{resource}", timeout: config[:timeout])
JSON.parse(r.get)
rescue Errno::ECONNREFUSED
warning 'Connection refused'
rescue RestClient::RequestTimeout
warning 'Connection timed out'