fluent-plugin-influxdb 0.2.0 → 0.2.1
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 +4 -4
- data/.gitignore +2 -0
- data/History.md +5 -0
- data/README.md +3 -0
- data/fluent-plugin-influxdb.gemspec +1 -1
- data/lib/fluent/plugin/out_influxdb.rb +7 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f16a13a54b8ffa49a68b394ac16271ad899ddcd6
|
4
|
+
data.tar.gz: 3f9e2c54329af62b049fd09aec973d5102f47af1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 09d9259e4ee79e9aa76baf8e6a36e2c918011ba0aff7f519a6511ee71f5172cc0a75ebd76947933ca5ef449d4810fd537d75e81c4d77d1f93d28a07e5a44ef7b
|
7
|
+
data.tar.gz: d8807fa69c444eb2aec7d4d467d13822b5a0054a52799b1e019cf517b29400c7ab8663bd8bb751811d034ee37b2b121d59dcf988fe038a5726d5891879641fa1
|
data/.gitignore
CHANGED
data/History.md
CHANGED
data/README.md
CHANGED
@@ -37,6 +37,8 @@ Just like other regular output plugins, Use type `influxdb` in your fluentd conf
|
|
37
37
|
|
38
38
|
`time_precision`: The time precision of timestamp. default to "s". should specify either second (s), millisecond (m), or microsecond (u)
|
39
39
|
|
40
|
+
`tag_keys`: The names of the keys to use as influxDB tags.
|
41
|
+
|
40
42
|
### Fluentd Tag and InfluxDB Series
|
41
43
|
|
42
44
|
influxdb plugin uses Fluentd event tag for InfluxDB series.
|
@@ -54,6 +56,7 @@ So if you have events with `app.event`, influxdb plugin inserts events into `app
|
|
54
56
|
password mypwd
|
55
57
|
use_ssl false
|
56
58
|
time_precision s
|
59
|
+
tag_keys ['key1', 'key2']
|
57
60
|
</match>
|
58
61
|
```
|
59
62
|
|
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "fluent-plugin-influxdb"
|
6
|
-
s.version = '0.2.
|
6
|
+
s.version = '0.2.1'
|
7
7
|
s.authors = ["Masahiro Nakagawa", "FangLi"]
|
8
8
|
s.email = ["repeatedly@gmail.com", "surivlee@gmail.com"]
|
9
9
|
s.description = %q{InfluxDB output plugin for Fluentd}
|
@@ -14,6 +14,7 @@ class Fluent::InfluxdbOutput < Fluent::BufferedOutput
|
|
14
14
|
config_param :password, :string, :default => 'root', :secret => true
|
15
15
|
config_param :time_precision, :string, :default => 's'
|
16
16
|
config_param :use_ssl, :bool, :default => false
|
17
|
+
config_param :tag_keys, :array, :default => []
|
17
18
|
|
18
19
|
|
19
20
|
def initialize
|
@@ -51,7 +52,12 @@ class Fluent::InfluxdbOutput < Fluent::BufferedOutput
|
|
51
52
|
point = {}
|
52
53
|
point[:timestamp] = record.delete('time') || time
|
53
54
|
point[:series] = tag
|
54
|
-
|
55
|
+
if tag_keys.empty?
|
56
|
+
point[:values] = record
|
57
|
+
else
|
58
|
+
point[:tags] = record.select{|k,v| @tag_keys.include?(k)}
|
59
|
+
point[:values] = record.select{|k,v| !@tag_keys.include?(k)}
|
60
|
+
end
|
55
61
|
points << point
|
56
62
|
end
|
57
63
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-influxdb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masahiro Nakagawa
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-07-
|
12
|
+
date: 2015-07-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fluentd
|