lib/riemann/babbler/plugin.rb in riemann-babbler-0.3.4 vs lib/riemann/babbler/plugin.rb in riemann-babbler-0.3.5

- old
+ new

@@ -31,11 +31,11 @@ @configatron end alias :opts :options def report(event) - report_with_diff(event) and return if event[:is_diff] + report_with_diff(event) and return if event[:as_diff] event[:state] = state(event[:metric]) unless plugin.states.critical.nil? event[:tags] = options.riemann.tags unless options.riemann.tags.nil? event[:host] = host logger.debug "Report status: #{event.inspect}" riemann << event @@ -43,10 +43,10 @@ def report_with_diff(event) current_metric = event[:metric] event[:metric] = current_metric - @storage[ event[:service] ] if @storage.has_key? event[:service] @storage[ event[:service] ] = current_metric - event.delete(:is_diff) + event.delete(:as_diff) report(event) end def host hostname = `hostname`.chomp.downcase