adp-fluent-plugin-graphite 0.0.12 → 0.0.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/adp-fluent-plugin-graphite.gemspec +1 -1
- data/lib/fluent/plugin/out_graphite.rb +21 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bdc659c05139601bebe60bb78d620f621f325eb1b6d7818b4d3cda32507b8f6b
|
4
|
+
data.tar.gz: b08bf8c9d21ea555b1ff54f0bb5fc474ef8957e8661f0a9aa6305ddfc5e7efd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 864cd915362d2c9911bacf8f7b65b6fa5b465dbaee05a17f89d7cc19280e55575726101a3a78d893d06fdae7597ac9e6db38d73e3196981ee66390e7c942767c
|
7
|
+
data.tar.gz: 43681aace2378bb5c7969eccf0c7d6567c3dc6ed2bd272be4ad24b9a0841f66aca3781c167d0b0c3968cb891254b68302122ffc25f316b46185f12c82642557c
|
@@ -3,7 +3,7 @@ $:.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.
|
6
|
+
gem.version = '0.0.16'
|
7
7
|
gem.authors = ['Satoshi SUZUKI']
|
8
8
|
gem.email = 'studio3104.com@gmail.com'
|
9
9
|
gem.homepage = 'https://github.com/studio3104/fluent-plugin-graphite'
|
@@ -7,7 +7,7 @@ module Fluent::Plugin
|
|
7
7
|
config_param :host, :string
|
8
8
|
config_param :port, :integer, default: 2003
|
9
9
|
config_param :tag_for, :string, default: 'prefix'
|
10
|
-
config_param :
|
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
|
13
13
|
|
@@ -43,7 +43,7 @@ module Fluent::Plugin
|
|
43
43
|
|
44
44
|
def format_metrics(tag, record)
|
45
45
|
metrics = {}
|
46
|
-
metrics[tag] = 1
|
46
|
+
metrics[@monitoring_key + "." + tag] = 1
|
47
47
|
metrics
|
48
48
|
end
|
49
49
|
|
@@ -70,7 +70,25 @@ module Fluent::Plugin
|
|
70
70
|
end
|
71
71
|
|
72
72
|
def connect_client!
|
73
|
-
|
73
|
+
options = {
|
74
|
+
# Required: valid URI {udp,tcp}://host:port/?timeout=seconds
|
75
|
+
graphite: "tcp://#{@host}:#{@port}",
|
76
|
+
|
77
|
+
# Optional: results are aggregated in 60 seconds slices ( default is 60 )
|
78
|
+
slice: 60,
|
79
|
+
|
80
|
+
# Optional: send to graphite every 60 seconds ( default is 0 - direct send )
|
81
|
+
interval: 30,
|
82
|
+
|
83
|
+
# Optional: set the max age in seconds for records reanimation ( default is 12 hours )
|
84
|
+
cache: 4 * 60 * 60,
|
85
|
+
|
86
|
+
# Optional: The default aggregation method for multiple reports in the same slice (default is :sum).
|
87
|
+
# Possible options: :sum, :avg, :replace
|
88
|
+
default_aggregation_method: :avg
|
89
|
+
}
|
90
|
+
@client = GraphiteAPI.new options
|
91
|
+
GraphiteAPI::Logger.init level: :debug
|
74
92
|
log.info("starting client")
|
75
93
|
end
|
76
94
|
end
|