lib/riemann/babbler/plugins/cpu.rb in riemann-babbler-0.4.6 vs lib/riemann/babbler/plugins/cpu.rb in riemann-babbler-0.4.7

- old
+ new

@@ -11,9 +11,15 @@ total = used + i2-i1 fraction = used.to_f / total end @old_cpu = [u2, n2, s2, i2] - { :service => plugin.service, :metric => fraction } + + if @old_cpu + { :service => plugin.service, :metric => fraction } + else + { :service => plugin.service, :state => 'ok' } + end + end end