fluent-plugin-ganglia 0.0.1 → 0.0.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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 322fd487f7eb2837954be6c8f7ff99e44ba89b7b
4
+ data.tar.gz: 2e04cd7bbcd898562525cf25694977fecee88e03
5
+ SHA512:
6
+ metadata.gz: 45c95a6869afa871aabdaf55463c02e7250265b4f8dd7e4f4de11bc3827c330f44da1424a856943533257b7354e7ddcbf16ea240cb9782996302bd356cd12948
7
+ data.tar.gz: ba8c8c3f54dc67fa87407c2585ad93a5f44204aabee4022324500540d7d2a9845375bac5f9190ba8086968c71fea47c90a3ef5109bd18571de62542cb26ed5f5
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source :rubygems
1
+ source "https://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in fluent-plugin-ganglia.gemspec
4
4
  gemspec
@@ -44,9 +44,9 @@ Plugin to output values to Ganglia.
44
44
 
45
45
  = Example
46
46
 
47
- == gmond configured with multicast
47
+ == gmond is configured with multicast
48
48
 
49
- when the gmond configured with multicast and bind_hostname as below:
49
+ when gmond is configured with multicast and bind_hostname as below:
50
50
 
51
51
  udp_send_channel {
52
52
  mcast_join = 239.2.11.71
@@ -66,9 +66,9 @@ you should specify mcast_join ip address to _host_ and set _bind__hostname_ true
66
66
  bind_hostname true
67
67
  </match>
68
68
 
69
- == gmond configured with unicast
69
+ == gmond is configured with unicast
70
70
 
71
- when the gmond configured with unicast, you should specify _host_ and _port_ with same value of gmond.conf:
71
+ when gmond is configured with unicast, you should specify _host_ and _port_ with same value of gmond.conf:
72
72
 
73
73
  <match metrics>
74
74
  type ganglia
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = "fluent-plugin-ganglia"
5
- gem.version = "0.0.1"
5
+ gem.version = "0.0.2"
6
6
  gem.authors = ["Hiroshi Sakai"]
7
7
  gem.email = ["ziguzagu@gmail.com"]
8
8
  gem.description = %q{Fluentd output plugin to ganglia}
@@ -14,9 +14,8 @@ Gem::Specification.new do |gem|
14
14
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
15
15
  gem.require_paths = ["lib"]
16
16
 
17
- gem.add_development_dependency "rake"
18
- gem.add_development_dependency "fluentd"
17
+ gem.add_dependency "fluentd"
18
+ gem.add_dependency "gmetric"
19
19
 
20
- gem.add_runtime_dependency "fluentd"
21
- gem.add_runtime_dependency "gmetric"
20
+ gem.add_development_dependency "rake"
22
21
  end
@@ -4,6 +4,11 @@ class Fluent::GangliaOutput < Fluent::Output
4
4
  HOSTNAME = Socket.gethostname
5
5
  HOSTADDR = IPSocket.getaddress(HOSTNAME)
6
6
 
7
+ ## Define 'log' method to support log method for v0.10.42 or earlier
8
+ unless method_defined?(:log)
9
+ define_method("log") { $log }
10
+ end
11
+
7
12
  def initialize
8
13
  super
9
14
  require "gmetric"
@@ -55,7 +60,7 @@ class Fluent::GangliaOutput < Fluent::Output
55
60
  name = "#{@add_key_prefix} #{name}"
56
61
  end
57
62
  begin
58
- $log.debug("ganglia: #{name}: #{value}, ts: #{time}")
63
+ log.debug("ganglia: #{name}: #{value}, ts: #{time}")
59
64
  gmetric = Ganglia::GMetric.pack(
60
65
  :name => name,
61
66
  :value => value.to_s,
@@ -76,10 +81,10 @@ class Fluent::GangliaOutput < Fluent::Output
76
81
  conn.close
77
82
  status = true
78
83
  rescue IOError, EOFError, SystemCallError
79
- $log.warn "Ganglia::GMetric.send raises exception: #{$!.class}, '#{$!.message}'"
84
+ log.warn "Ganglia::GMetric.send raises exception: #{$!.class}, '#{$!.message}'"
80
85
  end
81
86
  unless status
82
- $log.warn "failed to send to ganglia: #{@host}:#{@port}, '#{name}': #{value}"
87
+ log.warn "failed to send to ganglia: #{@host}:#{@port}, '#{name}': #{value}"
83
88
  end
84
89
  end
85
90
 
metadata CHANGED
@@ -1,78 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-ganglia
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
5
- prerelease:
4
+ version: 0.0.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Hiroshi Sakai
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-03-10 00:00:00.000000000 Z
11
+ date: 2014-02-09 00:00:00.000000000 Z
13
12
  dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: rake
16
- requirement: !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '0'
22
- type: :development
23
- prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ! '>='
28
- - !ruby/object:Gem::Version
29
- version: '0'
30
13
  - !ruby/object:Gem::Dependency
31
14
  name: fluentd
32
15
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
16
  requirements:
35
- - - ! '>='
17
+ - - ">="
36
18
  - !ruby/object:Gem::Version
37
19
  version: '0'
38
- type: :development
20
+ type: :runtime
39
21
  prerelease: false
40
22
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
23
  requirements:
43
- - - ! '>='
24
+ - - ">="
44
25
  - !ruby/object:Gem::Version
45
26
  version: '0'
46
27
  - !ruby/object:Gem::Dependency
47
- name: fluentd
28
+ name: gmetric
48
29
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
30
  requirements:
51
- - - ! '>='
31
+ - - ">="
52
32
  - !ruby/object:Gem::Version
53
33
  version: '0'
54
34
  type: :runtime
55
35
  prerelease: false
56
36
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
37
  requirements:
59
- - - ! '>='
38
+ - - ">="
60
39
  - !ruby/object:Gem::Version
61
40
  version: '0'
62
41
  - !ruby/object:Gem::Dependency
63
- name: gmetric
42
+ name: rake
64
43
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
44
  requirements:
67
- - - ! '>='
45
+ - - ">="
68
46
  - !ruby/object:Gem::Version
69
47
  version: '0'
70
- type: :runtime
48
+ type: :development
71
49
  prerelease: false
72
50
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
51
  requirements:
75
- - - ! '>='
52
+ - - ">="
76
53
  - !ruby/object:Gem::Version
77
54
  version: '0'
78
55
  description: Fluentd output plugin to ganglia
@@ -82,7 +59,7 @@ executables: []
82
59
  extensions: []
83
60
  extra_rdoc_files: []
84
61
  files:
85
- - .gitignore
62
+ - ".gitignore"
86
63
  - Gemfile
87
64
  - README.rdoc
88
65
  - Rakefile
@@ -93,27 +70,26 @@ files:
93
70
  - test/plugins.rb
94
71
  homepage: https://github.com/ziguzagu/fluent-plugin-ganglia
95
72
  licenses: []
73
+ metadata: {}
96
74
  post_install_message:
97
75
  rdoc_options: []
98
76
  require_paths:
99
77
  - lib
100
78
  required_ruby_version: !ruby/object:Gem::Requirement
101
- none: false
102
79
  requirements:
103
- - - ! '>='
80
+ - - ">="
104
81
  - !ruby/object:Gem::Version
105
82
  version: '0'
106
83
  required_rubygems_version: !ruby/object:Gem::Requirement
107
- none: false
108
84
  requirements:
109
- - - ! '>='
85
+ - - ">="
110
86
  - !ruby/object:Gem::Version
111
87
  version: '0'
112
88
  requirements: []
113
89
  rubyforge_project:
114
- rubygems_version: 1.8.24
90
+ rubygems_version: 2.2.0
115
91
  signing_key:
116
- specification_version: 3
92
+ specification_version: 4
117
93
  summary: Fluentd output plugin to ganglia
118
94
  test_files:
119
95
  - test/helper.rb