lib/riemann/babbler/plugins/mpeg2lander.rb in riemann-babbler-1.0.7.1 vs lib/riemann/babbler/plugins/mpeg2lander.rb in riemann-babbler-1.0.7.2
- old
+ new
@@ -13,10 +13,10 @@
array = Array.new
JSON.parse( rest_get( plugin.url ) )['streams'].each do |stream|
stream['programs'].each do |programm|
next unless programm['time_tracker']
next unless programm['time_tracker']['current_time']
- timing = abs(programm['time_tracker']['current_time'].split('diff')[1].to_i)
+ timing = (programm['time_tracker']['current_time'].split('diff')[1].to_i).abs
array << { :service => plugin.service + " status #{programm['name']}", :metric => timing.to_i, :description => "Mpeg2lander timming name #{programm['name']}" }
end # end programm
end # end stream
array
end