riemann-babbler 2.5.2 → 2.5.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 424c014b8907bd1e525e74d60cefb61bcb1703de
4
- data.tar.gz: 8c094a607d4a165938d6905b8bffcaf783d56148
3
+ metadata.gz: 131f9e79a7f80c8b88ba4fbaf4c24debd410406a
4
+ data.tar.gz: cda03c18b581e0bbe0fb8a1f6deae1ed531f9c19
5
5
  SHA512:
6
- metadata.gz: 4511b3cd0355050da41c40e19b09c934878ff9fe5f0342ca7bc19fd3e0a10af6edce86ae14bc033414c7f3025bbdf0ef1e31cf3e87585533ffe3f615355eb5c1
7
- data.tar.gz: f447ac5c27014e8b505781cdcd740a6f1257cbd015880379fbaedf37a319cb4d7c1a6f09878a59bc5d1d0f0103d14b4332a5de26fc0e854d51f7d9be137ef45b
6
+ metadata.gz: 43ec0094a423e5bb96f007908f8f9533bdcdcdb370d84cec052c3558569426887d58d2f0159d5a809d000f050fbc4cd783c06fb4b13288a52f02e2afeea3b80f
7
+ data.tar.gz: 82c3600aff958878a23c69c2b4c1bbd07b1eb6756e1894d76cd0d27621cc15ab5cf214067806a364381d35ec7297326597113df8e745f2a6966f520e75c2fc44
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- riemann-babbler (2.5.2)
4
+ riemann-babbler (2.5.3)
5
5
  configatron
6
6
  docile
7
7
  file-tail
@@ -39,7 +39,7 @@ module Riemann
39
39
  end
40
40
 
41
41
  def alive?
42
- @runner.nil? || @runner.alive?
42
+ !@runner.nil? || @runner.alive?
43
43
  end
44
44
 
45
45
  def <<(event)
@@ -54,29 +54,26 @@ module Riemann
54
54
  return nil if @events.empty?
55
55
  while @events.size > 0
56
56
  event = @events[0]
57
- log :debug, "Post event via #{@host}:#{@port} : #{event.inspect}"
58
57
  Timeout::timeout(opts.riemann.timeout) {
59
58
  @riemann << event
60
59
  }
61
60
  @events.shift
61
+ log :debug, "Posted event (#{@host}:#{@port}): #{event.inspect}"
62
62
  end
63
63
  end
64
64
 
65
65
  # riemann client
66
66
  def build_client
67
67
  @riemann = nil
68
- @riemann = Riemann::Client.new(:host => resolv(@host), :port => @port, :timeout => opts.riemann.timeout)
68
+ @riemann = Riemann::Client.new({
69
+ :host => Resolv.new.getaddress(@host),
70
+ :port => @port,
71
+ :timeout => opts.riemann.timeout
72
+ })
69
73
  @riemann = @riemann.tcp if opts.riemann.tcp
70
74
  @riemann
71
75
  end
72
76
 
73
- #@return ipaddress of riemann server
74
- def resolv(host)
75
- ip = Resolv.new.getaddress(host)
76
- log :debug, "Resolv host: #{host} => #{ip}"
77
- ip
78
- end
79
-
80
77
  end
81
78
  end
82
79
  end
@@ -1,5 +1,5 @@
1
1
  module Riemann
2
2
  module Babbler
3
- VERSION = '2.5.2'
3
+ VERSION = '2.5.3'
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: 2.5.2
4
+ version: 2.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vasiliev Dmitry