fluent-plugin-split 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +13 -5
- data/fluent-plugin-split.gemspec +1 -1
- data/lib/fluent/plugin/out_split.rb +2 -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: f8366392d23a53164997a3121b140e32406ca732
|
4
|
+
data.tar.gz: f5aeab4a8423c52a54ffed4630e81b8c420631b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67f5b41fdc9f3ecb818f0544a19fa1b0c249dfde04c5003477d82a12ba61147deb3881f42dcb5420bf7392f22d9b8201f99791bd9298b21023a7c9f493214a97
|
7
|
+
data.tar.gz: 7f661bef25beb83b9769238dfaf8c5d4329923f76922c1ae7e4c1593e4079d051e89f63e04cbd454e676cf67179ec1237c62bc22114f1207a1aa9f625280040d
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -4,10 +4,18 @@ Output Split String Plugin for fluentd
|
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
|
7
|
+
### td-agent(Linux)
|
8
8
|
|
9
9
|
/usr/lib64/fluent/ruby/bin/fluent-gem install fluent-plugin-split
|
10
10
|
|
11
|
+
### td-agent(Mac)
|
12
|
+
|
13
|
+
sudo /usr/local/Cellar/td-agent/1.1.XX/bin/fluent-gem install fluent-plugin-split
|
14
|
+
|
15
|
+
### fluentd only
|
16
|
+
|
17
|
+
gem install fluent-plugin-split
|
18
|
+
|
11
19
|
|
12
20
|
## parameter
|
13
21
|
|
@@ -23,7 +31,7 @@ keep_keys|keep keys(comma separator)
|
|
23
31
|
|
24
32
|
Example:
|
25
33
|
|
26
|
-
<match
|
34
|
+
<match foo.bar>
|
27
35
|
type split
|
28
36
|
output_tag split.keyword
|
29
37
|
output_key keyword
|
@@ -41,9 +49,9 @@ foo.bar {"keywords"=>"keyword1,keyword2,keyword3", "site" => "google", "user_id"
|
|
41
49
|
then output becomes as below (indented):
|
42
50
|
|
43
51
|
```js
|
44
|
-
split.keyword { "keyword"
|
45
|
-
split.keyword { "keyword"
|
46
|
-
split.keyword { "keyword"
|
52
|
+
split.keyword { "keyword" => "keyword1", "site" => "google"}
|
53
|
+
split.keyword { "keyword" => "keyword2", "site" => "google"}
|
54
|
+
split.keyword { "keyword" => "keyword3", "site" => "google"}
|
47
55
|
```
|
48
56
|
|
49
57
|
## ChangeLog
|
data/fluent-plugin-split.gemspec
CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path('../lib', __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |gem|
|
5
5
|
gem.name = "fluent-plugin-split"
|
6
|
-
gem.version = "0.0.
|
6
|
+
gem.version = "0.0.2"
|
7
7
|
gem.authors = ["Hiroshi Toyama"]
|
8
8
|
gem.email = "toyama0919@gmail.com"
|
9
9
|
gem.homepage = "https://github.com/toyama0919/fluent-plugin-split"
|
@@ -20,7 +20,7 @@ module Fluent
|
|
20
20
|
elsif @format == "tsv"
|
21
21
|
@separator = '\t'
|
22
22
|
elsif @format == "space"
|
23
|
-
@separator =
|
23
|
+
@separator = /[\s ]/
|
24
24
|
else
|
25
25
|
@separator = @format
|
26
26
|
end
|
@@ -28,6 +28,7 @@ module Fluent
|
|
28
28
|
|
29
29
|
def emit(tag, es, chain)
|
30
30
|
es.each { |time, record|
|
31
|
+
next if record[@key_name].nil?
|
31
32
|
record[@key_name].split(@separator).each{|item|
|
32
33
|
result = {@output_key => item}
|
33
34
|
record.each {|key,value|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-split
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hiroshi Toyama
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|