riemann-babbler 1.0.7.1 → 1.0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,7 +12,7 @@ class Riemann::Babbler::Je < Riemann::Babbler
12
12
  def collect
13
13
  array = Array.new
14
14
  JSON.parse( rest_get( plugin.url ) ).each do |channel|
15
- timing = unixnow - channel['moment'].to_i
15
+ timing = (unixnow - channel['moment'].to_i).abs
16
16
  sid = channel['sid']
17
17
  array << { :service => plugin.service + " status #{sid}", :metric => timing.to_i, :description => "Je timming sid #{sid}, in sec." }
18
18
  end
@@ -15,7 +15,7 @@ class Riemann::Babbler::Mpeg2lander < Riemann::Babbler
15
15
  stream['programs'].each do |programm|
16
16
  next unless programm['time_tracker']
17
17
  next unless programm['time_tracker']['current_time']
18
- timing = abs(programm['time_tracker']['current_time'].split('diff')[1].to_i)
18
+ timing = (programm['time_tracker']['current_time'].split('diff')[1].to_i).abs
19
19
  array << { :service => plugin.service + " status #{programm['name']}", :metric => timing.to_i, :description => "Mpeg2lander timming name #{programm['name']}" }
20
20
  end # end programm
21
21
  end # end stream
@@ -15,7 +15,7 @@ class Riemann::Babbler::Sdigrabber < Riemann::Babbler
15
15
  box['processors'].each do |processor, processor_options|
16
16
  next unless processor =~ /Proc\s+encoder/
17
17
  next unless processor_options['setup']['last-unit-pts']
18
- timing = unixnow - processor_options['setup']['last-unit-pts'].to_i
18
+ timing = (unixnow - processor_options['setup']['last-unit-pts'].to_i).abs
19
19
  cid = processor_options['setup']['cid']
20
20
  array << { :service => plugin.service + " status #{cid}", :metric => timing.to_i, :description => "Sdigrabber timming cid #{cid}" }
21
21
  end
@@ -1,5 +1,5 @@
1
1
  module Riemann
2
2
  class Babbler
3
- VERSION = '1.0.7.1'
3
+ VERSION = '1.0.7.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: riemann-babbler
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7.1
4
+ version: 1.0.7.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: