bin/metrics-es-cluster.rb in sensu-plugins-elasticsearch-4.0.0 vs bin/metrics-es-cluster.rb in sensu-plugins-elasticsearch-4.0.1
- old
+ new
@@ -120,10 +120,10 @@
else
RestClient::Resource.new("#{protocol}://#{config[:host]}:#{config[:port]}#{resource}",
timeout: config[:timeout],
headers: headers)
end
- JSON.parse(r.get)
+ ::JSON.parse(r.get)
rescue Errno::ECONNREFUSED
warning 'Connection refused'
rescue RestClient::RequestTimeout
warning 'Connection timed out'
end