adp-fluent-plugin-graphite 0.0.14 → 0.0.18

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
  SHA256:
3
- metadata.gz: 21120861eb51aec332d4284c136334ea9fce73141f40323d1113e0d22f2958f0
4
- data.tar.gz: a5f0d97c4e056764d8bfd87dd02e4a5b733c9df89558ee3ec1155f307ce89400
3
+ metadata.gz: c696abc25c0b8423a39559a766b709b461c53383fe664d317065683db4b8e61c
4
+ data.tar.gz: 65dc4925391a451d7c33dd1e57814c2abc471ab80f646991d8aa668bfc858b67
5
5
  SHA512:
6
- metadata.gz: 95d3c4eb3c8527b372cdb151a4da8b067b3a23eda527584789687deb7c0e8135b59c472c28f43585b49e608a4a4f951573ce5dc4174c2ca7f70dea72f485d9dc
7
- data.tar.gz: dd18d9731cd866f0214f8c0073559b6cfbe95c718801a659a7d228c05a7919174b9e0b14f386c3b2d82bbd75700b84d373e9f94d90cbc016cc369179dd788353
6
+ metadata.gz: 18c4f641033cff5dee5e3841284a14a6eb66859fd307ff9bf7b2ffebaa584c67bdbe38eb18cea2ac76b3b12cfa54acd0d6ffdf9e49d897ba56f8199975df4840
7
+ data.tar.gz: 630da8b77e2fea85bc014f7f260d51906596e7de95568a74cb7a23dcf6b92512b57ce3743cd52126d2ee570338fac6e26ff8ccc78c7e7cf776a06988029591f3
@@ -3,10 +3,10 @@ $:.push File.expand_path('../lib', __FILE__)
3
3
 
4
4
  Gem::Specification.new do |gem|
5
5
  gem.name = 'adp-fluent-plugin-graphite'
6
- gem.version = '0.0.14'
7
- gem.authors = ['Satoshi SUZUKI']
8
- gem.email = 'studio3104.com@gmail.com'
9
- gem.homepage = 'https://github.com/studio3104/fluent-plugin-graphite'
6
+ gem.version = '0.0.18'
7
+ gem.authors = ['Aleksander Dudek']
8
+ gem.email = 'adudek4@gmail.com'
9
+ gem.homepage = ''
10
10
  gem.description = 'fluentd output plugin to send metrics to graphite'
11
11
  gem.summary = gem.description
12
12
  gem.licenses = ['MIT']
@@ -6,7 +6,7 @@ module Fluent::Plugin
6
6
 
7
7
  config_param :host, :string
8
8
  config_param :port, :integer, default: 2003
9
- config_param :tag_for, :string, default: 'prefix'
9
+ config_param :prefix, :string, default: 'adp-fluentd-agent'
10
10
  config_param :monitoring_key, :string
11
11
  config_param :name_key_pattern, :string, default: nil
12
12
  config_param :max_retries, :integer, default: 3
@@ -43,7 +43,8 @@ module Fluent::Plugin
43
43
 
44
44
  def format_metrics(tag, record)
45
45
  metrics = {}
46
- metrics[@monitoring_key + "." + tag] = 1
46
+ key = @monitoring_key + "." + @prefix + "." + tag
47
+ metrics[key] = 1
47
48
  metrics
48
49
  end
49
50
 
@@ -70,7 +71,21 @@ module Fluent::Plugin
70
71
  end
71
72
 
72
73
  def connect_client!
73
- @client = GraphiteAPI.new(graphite: "#{@host}:#{@port}")
74
+ options = {
75
+ # Required: valid URI {udp,tcp}://host:port/?timeout=seconds
76
+ graphite: "tcp://#{@host}:#{@port}",
77
+
78
+ # Optional: results are aggregated in 60 seconds slices ( default is 60 )
79
+ slice: 30,
80
+
81
+ # Optional: send to graphite every 60 seconds ( default is 0 - direct send )
82
+ interval: 30,
83
+
84
+ # Optional: set the max age in seconds for records reanimation ( default is 12 hours )
85
+ cache: 4 * 60 * 60,
86
+ }
87
+ @client = GraphiteAPI.new options
88
+ GraphiteAPI::Logger.init level: :debug
74
89
  log.info("starting client")
75
90
  end
76
91
  end
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adp-fluent-plugin-graphite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.18
5
5
  platform: ruby
6
6
  authors:
7
- - Satoshi SUZUKI
7
+ - Aleksander Dudek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
@@ -67,7 +67,7 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: 3.2.0
69
69
  description: fluentd output plugin to send metrics to graphite
70
- email: studio3104.com@gmail.com
70
+ email: adudek4@gmail.com
71
71
  executables: []
72
72
  extensions: []
73
73
  extra_rdoc_files: []
@@ -82,7 +82,7 @@ files:
82
82
  - lib/fluent/plugin/out_graphite.rb
83
83
  - test/helper.rb
84
84
  - test/plugin/test_out_graphite.rb
85
- homepage: https://github.com/studio3104/fluent-plugin-graphite
85
+ homepage: ''
86
86
  licenses:
87
87
  - MIT
88
88
  metadata: {}