lib/riemann/babbler/plugin.rb in riemann-babbler-2.0.3.1 vs lib/riemann/babbler/plugin.rb in riemann-babbler-2.0.3.2

- old
+ new

@@ -81,10 +81,10 @@ ### Helper for reports ### def report_with_diff(event) current_metric = event[:metric] old_metric = @storage['last_metric'][event[:service]] - if old_metric && (current_metric + old_metric < (2**64.to_f/plugin.inteval)) + if old_metric && ((current_metric + old_metric) < (2**64.to_f/plugin.inteval)) event[:metric] = current_metric - old_metric event.delete(:as_diff) report(event) end @storage['last_metric'][event[:service]] = current_metric