fluent-plugin-munin-node 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e19be264a0d1f562630effd9d72e4eb4967afe7f
4
- data.tar.gz: 2117c050f0b25c8e3ec7d2954c0be0ee1bf728a5
3
+ metadata.gz: 5cc85cebb9aa3ff84454f7091991da8e1670a5c9
4
+ data.tar.gz: 219fcc96cab1061c30253b5cc4a867f1a48d8426
5
5
  SHA512:
6
- metadata.gz: 6c92e3b576df6398dc890bc45a6415ddec47cba1615d7f489b86f5745d4803995ea9a3866870557f324977c62d439f2db33e38fd6afd90bbdb97de6b8d747e47
7
- data.tar.gz: 2adaad102c12490a78b62aef93729a804721e98bc1ce25cb354beaf61c52bdecd6802947f9e99bb6494465c241309bb2150757c4d3ddc320d587d1411f80652f
6
+ metadata.gz: 0ececd21421a0e36dd8290b223a23c51f47a16114c399bebe5195d1008b322fe09425149c05e5dfda4140b1d4d91a36411fc9aff296d158680edecabbbd1355b
7
+ data.tar.gz: 8bbbf9a9275a397bae6e3034606fe4989a4352de4193e296615d0ec1ed9940c44f9b78d69b5f5ce5a61e407617d443ef0c002d05ddd431b2557cf25878f77506
@@ -33,7 +33,6 @@ class Fluent::MuninNodeInput < Fluent::Input
33
33
  def start
34
34
  super
35
35
 
36
- @node = Munin::Node.new(@node_host, @node_port)
37
36
  @loop = Coolio::Loop.new
38
37
  timer = TimerWatcher.new(@interval, true, log, &method(:fetch_items))
39
38
  @loop.attach(timer)
@@ -46,9 +45,6 @@ class Fluent::MuninNodeInput < Fluent::Input
46
45
 
47
46
  # XXX: Comment out for exit soon. Is it OK?
48
47
  #@thread.join
49
-
50
- @node.disconnect
51
- @node.connection.close
52
48
  end
53
49
 
54
50
  private
@@ -63,9 +59,12 @@ class Fluent::MuninNodeInput < Fluent::Input
63
59
  def fetch_items
64
60
  values_by_plugin = {}
65
61
 
66
- @node.list.each do |plugin|
62
+ # It's connected every fetch of metrics.
63
+ node = Munin::Node.new(@node_host, @node_port)
64
+
65
+ node.list.each do |plugin|
67
66
  begin
68
- plugin_values = @node.fetch(plugin)
67
+ plugin_values = node.fetch(plugin)
69
68
  values_by_plugin.update(plugin_values)
70
69
  rescue => e
71
70
  log.warn("#{plugin}: #{e.message}")
@@ -1,3 +1,3 @@
1
1
  module FluentPluginMuninNode
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-munin-node
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara