bin/metrics-es-cluster.rb in sensu-plugins-elasticsearch-0.4.1 vs bin/metrics-es-cluster.rb in sensu-plugins-elasticsearch-0.4.2

- old
+ new

@@ -134,9 +134,13 @@ cluster_stats = get_es_resource('/_cluster/stats') cluster_metrics = Hash.new { |h, k| h[k] = {} } cluster_metrics['fs']['total_in_bytes'] = cluster_stats['nodes']['fs']['total_in_bytes'] cluster_metrics['fs']['free_in_bytes'] = cluster_stats['nodes']['fs']['free_in_bytes'] cluster_metrics['fs']['store_in_bytes'] = cluster_stats['indices']['store']['size_in_bytes'] + cluster_metrics['fs']['disk_reads'] = cluster_stats['nodes']['fs']['disk_reads'] + cluster_metrics['fs']['disk_writes'] = cluster_stats['nodes']['fs']['disk_writes'] + cluster_metrics['fs']['disk_read_size_in_bytes'] = cluster_stats['nodes']['fs']['disk_read_size_in_bytes'] + cluster_metrics['fs']['disk_write_size_in_bytes'] = cluster_stats['nodes']['fs']['disk_write_size_in_bytes'] cluster_metrics['fielddata']['memory_size_in_bytes'] = cluster_stats['indices']['fielddata']['memory_size_in_bytes'] cluster_metrics['fielddata']['evictions'] = cluster_stats['indices']['fielddata']['evictions'] # Elasticsearch changed the name filter_cache to query_cache in 2.0+ cache_name = Gem::Version.new(acquire_es_version) < Gem::Version.new('2.0.0') ? 'filter_cache' : 'query_cache'