From f2077bd94708f448a51ae401039d011c6c77afef Mon Sep 17 00:00:00 2001 From: Jeroen van Nieuwenhuizen Date: Thu, 10 Mar 2016 08:00:14 +0100 Subject: [PATCH] parse ceph df -f json output from hammer in pool --- jobs/pool.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/jobs/pool.rb b/jobs/pool.rb index c801d96..635214a 100644 --- a/jobs/pool.rb +++ b/jobs/pool.rb @@ -18,14 +18,14 @@ # update total storage widget storage = JSON.parse(result) - used = storage['stats']['total_used'].to_i - total = storage['stats']['total_space'].to_i + used = storage['stats']['total_used_bytes'].to_i + total = storage['stats']['total_bytes'].to_i send_event('storage', { - value: Filesize.from("#{used} KB").pretty.split(' ').first.to_f, + value: Filesize.from("#{used} B").pretty.split(' ').first.to_f, min: 0, - max: Filesize.from("#{total} KB").pretty.split(' ').first.to_f, - moreinfo: Filesize.from("#{used} KB").pretty + " out of " + Filesize.from("#{total} KB").pretty + max: Filesize.from("#{total} B").pretty.split(' ').first.to_f, + moreinfo: Filesize.from("#{used} B").pretty + " out of " + Filesize.from("#{total} B").pretty } )