bin/metrics-es-cluster.rb in sensu-plugins-elasticsearch-1.12.0 vs bin/metrics-es-cluster.rb in sensu-plugins-elasticsearch-2.0.0

- old
+ new

@@ -142,12 +142,12 @@ end local['nodes'].keys.first == state['master_node'] end def acquire_health - health = get_es_resource('/_cluster/health').reject { |k, _v| %w(cluster_name timed_out).include?(k) } - health['status'] = %w(red yellow green).index(health['status']) + health = get_es_resource('/_cluster/health').reject { |k, _v| %w[cluster_name timed_out].include?(k) } + health['status'] = %w[red yellow green].index(health['status']) health end def acquire_document_count document_count = get_es_resource('/_stats/docs') @@ -189,10 +189,10 @@ def acquire_allocation_status cluster_config = get_es_resource('/_cluster/settings') transient_settings = cluster_config['transient'] if transient_settings.key?('cluster') - return %w(none new_primaries primaries all).index(transient_settings['cluster']['routing']['allocation']['enable']) + return %w[none new_primaries primaries all].index(transient_settings['cluster']['routing']['allocation']['enable']) else return nil end end