lib/riemann/babbler/plugins/cpu.rb in riemann-babbler-0.0.3 vs lib/riemann/babbler/plugins/cpu.rb in riemann-babbler-0.0.4
- old
+ new
@@ -16,17 +16,14 @@
total = used + i2-i1
fraction = used.to_f / total
end
@old_cpu = [u2, n2, s2, i2]
- log.error fraction
fraction
end
def tick
current_state = cpu
- # при первом проходе у нас будет nil
- next unless current_state
report({
:service => plugin.service,
:state => state(current_state),
:metric => current_state
})