lib/riemann/babbler/plugin.rb in riemann-babbler-0.2.1 vs lib/riemann/babbler/plugin.rb in riemann-babbler-0.2.2
- old
+ new
@@ -39,10 +39,10 @@
riemann << event
end
def report_with_diff(event)
current_metric = event[:metric]
- event[:metric] = @storage[ event[:service] ] - current_metric if @storage.has_key? event[:service]
+ event[:metric] = current_metric - @storage[ event[:service] ] if @storage.has_key? event[:service]
@storage[ event[:service] ] = current_metric
event[:state] = state(current_metric) unless plugin.states.critical.nil?
report(event)
end