lib/riemann/babbler/plugins/sdigrabber.rb in riemann-babbler-1.0.7.1 vs lib/riemann/babbler/plugins/sdigrabber.rb in riemann-babbler-1.0.7.2

- old
+ new

@@ -13,10 +13,10 @@ array = Array.new JSON.parse( rest_get( plugin.url ) ).each do |box| box['processors'].each do |processor, processor_options| next unless processor =~ /Proc\s+encoder/ next unless processor_options['setup']['last-unit-pts'] - timing = unixnow - processor_options['setup']['last-unit-pts'].to_i + timing = (unixnow - processor_options['setup']['last-unit-pts'].to_i).abs cid = processor_options['setup']['cid'] array << { :service => plugin.service + " status #{cid}", :metric => timing.to_i, :description => "Sdigrabber timming cid #{cid}" } end end array