bin/check-es-heap.rb in sensu-plugins-elasticsearch-1.0.0 vs bin/check-es-heap.rb in sensu-plugins-elasticsearch-1.1.0
- old
+ new
@@ -120,12 +120,12 @@
warning 'Elasticsearch API returned invalid JSON'
end
def acquire_heap_data(return_max = false)
stats = if Gem::Version.new(acquire_es_version) >= Gem::Version.new('1.0.0')
- acquire_es_resource('/_nodes/_local/stats?jvm=true')
+ acquire_es_resource('/_nodes/_local/stats')
else
- acquire_es_resource('/_cluster/nodes/_local/stats?jvm=true')
+ acquire_es_resource('/_cluster/nodes/_local/stats')
end
node = stats['nodes'].keys.first
begin
if return_max
return stats['nodes'][node]['jvm']['mem']['heap_used_in_bytes'], stats['nodes'][node]['jvm']['mem']['heap_max_in_bytes']