riemann-babbler 1.2.1 → 1.2.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.
@@ -3,7 +3,7 @@ class Riemann::Babbler::Runit < Riemann::Babbler
3
3
  def init
4
4
  plugin.set_default(:service, 'runit')
5
5
  plugin.set_default(:not_monit, ['riemann-client'])
6
- plugin.set_default(:warning_uptime, 10)
6
+ plugin.set_default(:uptime, 10)
7
7
  plugin.set_default(:interval, 60)
8
8
  end
9
9
 
@@ -26,10 +26,8 @@ class Riemann::Babbler::Runit < Riemann::Babbler
26
26
  stat_file = File.join(srv, 'supervise', 'stat')
27
27
  next unless File.exists? stat_file
28
28
  srv_uptime = uptime(srv)
29
- if (File.read( stat_file ).strip == 'run') && (srv_uptime > plugin.interval)
29
+ if (File.read( stat_file ).strip == 'run') && (srv_uptime > plugin.uptime)
30
30
  status << {:service => plugin.service + human_srv , :state => 'ok', :description => "runit service #{human_srv} running", :metric => srv_uptime}
31
- elsif (File.read( stat_file ).strip == 'run') && (srv_uptime < plugin.warning_uptime)
32
- status << {:service => plugin.service + human_srv , :state => 'warning', :description => "runit service #{human_srv} small uptime", :metric => srv_uptime}
33
31
  else
34
32
  status << {:service => plugin.service + human_srv , :state => 'critical', :description => "runit service #{human_srv} not running", :metric => srv_uptime}
35
33
  end
@@ -1,5 +1,5 @@
1
1
  module Riemann
2
2
  class Babbler
3
- VERSION = '1.2.1'
3
+ VERSION = '1.2.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.2.1
4
+ version: 1.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: