bin/metrics-es-cluster.rb in sensu-plugins-elasticsearch-1.8.0 vs bin/metrics-es-cluster.rb in sensu-plugins-elasticsearch-1.8.1

- old
+ new

@@ -68,11 +68,11 @@ short: '-a', long: '--allow-non-master', default: false option :enable_percolate, - description: 'Enables percolator stats', + description: 'Enables percolator stats (ES 2 and older only)', short: '-o', long: '--enable-percolate', default: false option :user, @@ -164,10 +164,10 @@ cluster_metrics[cache_name]['memory_size_in_bytes'] = cluster_stats['indices'][cache_name]['memory_size_in_bytes'] cluster_metrics[cache_name]['evictions'] = cluster_stats['indices'][cache_name]['evictions'] cluster_metrics['mem'] = cluster_stats['nodes']['jvm']['mem'] - if config[:enable_percolate] + if config[:enable_percolate] && Gem::Version.new(acquire_es_version) < Gem::Version.new('5.0.0') cluster_metrics['percolate']['total'] = cluster_stats['indices']['percolate']['total'] cluster_metrics['percolate']['time_in_millis'] = cluster_stats['indices']['percolate']['time_in_millis'] cluster_metrics['percolate']['queries'] = cluster_stats['indices']['percolate']['queries'] end cluster_metrics