From fbb97b453e511535a0d19eff47fb931ae74261cb Mon Sep 17 00:00:00 2001 From: Martin Cozzi Date: Wed, 23 Apr 2014 12:25:47 -0700 Subject: [PATCH] More explicit name for method fetching ES version. --- plugins/elasticsearch/check-es-cluster-status.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/elasticsearch/check-es-cluster-status.rb b/plugins/elasticsearch/check-es-cluster-status.rb index 881ec391f..2ce6fae71 100755 --- a/plugins/elasticsearch/check-es-cluster-status.rb +++ b/plugins/elasticsearch/check-es-cluster-status.rb @@ -46,13 +46,13 @@ def get_es_resource(resource) end end - def version + def get_es_version info = get_es_resource('/') info['version']['number'] end def is_master - if Gem::Version.new(version) >= Gem::Version.new('1.0.0') + if Gem::Version.new(get_es_version) >= Gem::Version.new('1.0.0') master = get_es_resource('_cluster/state/master_node')['master_node'] local = get_es_resource('/_nodes/_local') else