lib/riemann/babbler/plugins/memory.rb in riemann-babbler-0.4.9 vs lib/riemann/babbler/plugins/memory.rb in riemann-babbler-0.5.0

- old
+ new

@@ -11,12 +11,13 @@ fraction = 1 - (free.to_f / total) desc = "usage\n\n#{shell('ps -eo pmem,pid,cmd | sort -nrb -k1 | head -10').chomp}" [ - { :service => plugin.service, :metric => fraction }, - { :service => plugin.service + " free", :metric => free.to_f, :state => 'ok', :description => desc }, - { :service => plugin.service + " total", :metric => total.to_f, :state => 'ok', :description => desc } + { :service => plugin.service + " free_%+Buffers+Cached", :metric => fraction }, + { :service => plugin.service + " swap_%", :metric => (m['SwapTotal'] - m['SwapFree']).to_f/m['SwapTotal'] }, + { :service => plugin.service + " free", :metric => free.to_i, :state => 'ok', :description => desc }, + { :service => plugin.service + " total", :metric => total.to_i, :state => 'ok', :description => desc } ] end end