fluent-plugin-path2tag 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/fluent/plugin/out_path2tag.rb +5 -0
- data/lib/fluent/plugin/path2tag/version.rb +1 -1
- data/test/plugin/test_path2tag.rb +12 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6184b0c3f2880c16bca0e54de830ff95a1f9e208
|
4
|
+
data.tar.gz: 593dd033811e80535d6848c97a162d3dda802e29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42f85e5cffb63d532e412a3ee8328a6bc1aa7a061283972a1b1f1ee6c2975f7d57bdfbe7cb864141916eed3f83dcb9de578586f1aca12fb600bc4eaa933ae956
|
7
|
+
data.tar.gz: c9b554a0a47f83803744720d6958202164c3c52c6f2bb3945dc1f99eb6d7212e95b523063acc0f076d2398dc603ed9bf611755c6ff311d84319dcb949a2d4c75
|
data/README.md
CHANGED
@@ -10,10 +10,10 @@ Convert uri to tag. And reformat json data.
|
|
10
10
|
$ gem install fluent-plugin-path2tag
|
11
11
|
|
12
12
|
# for td-agent (Legacy)
|
13
|
-
$ sudo /usr/lib64/fluent/ruby/bin/fluent-gem install ffluent-plugin-path2tag -v 1.0.
|
13
|
+
$ sudo /usr/lib64/fluent/ruby/bin/fluent-gem install ffluent-plugin-path2tag -v 1.0.3
|
14
14
|
|
15
15
|
# for td-agent2 (with fluentd v0.12)
|
16
|
-
$ sudo td-agent-gem install fluent-plugin-path2tag -v 1.0.
|
16
|
+
$ sudo td-agent-gem install fluent-plugin-path2tag -v 1.0.3
|
17
17
|
```
|
18
18
|
|
19
19
|
## Configuration
|
@@ -127,6 +127,18 @@ class Path2tagTest < Test::Unit::TestCase
|
|
127
127
|
assert_equal 'path', emits[0][0]
|
128
128
|
assert_equal JSON.parse(body), emits[0][2]
|
129
129
|
end
|
130
|
+
|
131
|
+
def test_emit_path_format_5
|
132
|
+
d1 = create_driver(CONFIG_OK, 'nginx.access')
|
133
|
+
body = '{"fluentd_time":"2017-02-20 10:39:14 UTC","unique_id":"123ABC","device_token":"ABC123"}'
|
134
|
+
d1.run do
|
135
|
+
d1.emit({'request_uri' => 'path/foo/bar?param1=1?param2=2', 'request_body' => body})
|
136
|
+
end
|
137
|
+
emits = d1.emits
|
138
|
+
assert_equal 1, emits.length
|
139
|
+
assert_equal 'path.foo.bar', emits[0][0]
|
140
|
+
assert_equal JSON.parse(body), emits[0][2]
|
141
|
+
end
|
130
142
|
|
131
143
|
def test_emit_json_parse
|
132
144
|
d1 = create_driver(CONFIG_OK, 'nginx.access')
|