fluent-plugin-uri-parser 0.0.2 → 0.1.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3368e5f4c26d44387e7af1d2af08b8b17c462850
4
- data.tar.gz: 2ccfdd58c2e3654470f1d0c486340e02815f765b
3
+ metadata.gz: 8c660e74ab27100de590c485ce3565683beec95e
4
+ data.tar.gz: c3b0b9ff23d8a99804adefd4053d8cbe18694a93
5
5
  SHA512:
6
- metadata.gz: eb30ccbb8b9390d44e884814360c14b0584e893f282def432e38848bdeaf1b3701cbf573ba1556658e2a16c37c7423dd8f590870a7e07e36ef2e52c5b27fbffe
7
- data.tar.gz: fe07bb1ac57ac0b66329d83ba752a8a01ac2833eec9e99885d60df2d610a2ea6e3add1af839c5f1cd9dc750da061ba87d29541b756c81bf43d8d100a34f7a6f8
6
+ metadata.gz: b776ac7205ed56dd317f16adde63bbfc20bf8d9e33d7e402620efd6a3244120c5e7fefddfdeda7c6c5ca9e191ec1cc64221103d34c0b0018445e1f2d89bc7fd8
7
+ data.tar.gz: 4e7d5f7b2e3d31dc07d788d728183e54d15e15995173949333fb169640e7899a2c0b7caab89e03811d41f5058c37189caa7df00f2a74f667e5c737c4acaf53cc
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # fluent-plugin-uri-parser
2
2
 
3
- [![wercker status](https://app.wercker.com/status/a735d29143f3a1a727fc65653bc81e2a/s "wercker status")](https://app.wercker.com/project/bykey/a735d29143f3a1a727fc65653bc81e2a)
3
+ [![Gem Version](https://badge.fury.io/rb/fluent-plugin-uri-parser.svg)](https://badge.fury.io/rb/fluent-plugin-uri-parser) [![wercker status](https://app.wercker.com/status/a735d29143f3a1a727fc65653bc81e2a/s "wercker status")](https://app.wercker.com/project/bykey/a735d29143f3a1a727fc65653bc81e2a)
4
4
 
5
5
  This is a Fluentd plugin to parse uri and query string in log messages.
6
6
 
@@ -20,16 +20,74 @@ Or install it yourself as:
20
20
 
21
21
  $ gem install fluent-plugin-uri-parser
22
22
 
23
- ## Usage
23
+ ## Component
24
24
 
25
- fluent-plugin-uri-parser includes 2 plugins.
25
+ ### URIParserFilter
26
26
 
27
- * uri_parser filter plugin
28
- * query_string_parser filter plugin
27
+ This is a Fluentd plugin to parse and filtering uri in log messages and re-emit them.
29
28
 
30
- ## TODO
29
+ ### QueryStringParserFilter
31
30
 
32
- * Write configuration sample in README.md
31
+ This is a Fluentd plugin to parse and filtering query string in log messages and re-emit them.
32
+
33
+ ## Configuration
34
+
35
+ ```
36
+ <filter>
37
+ @type uri_parser
38
+ key_name uri
39
+ inject_key_prefix parsed
40
+ # hash_value_field parsed
41
+ # suppress_parse_error_log false
42
+ # ignore_key_not_exist false
43
+ # ignore_nil false
44
+
45
+ out_key_scheme scheme
46
+ out_key_host host
47
+ out_key_port port
48
+ out_key_path path
49
+ out_key_query query
50
+ out_key_fragment fragment
51
+ </match>
52
+ # input string of data: {"uri": "http://example.com/path?foo=bar#t=1"}
53
+ # output data: {"parsed.scheme":"http","parsed.host":"example.com","parsed.port":80,"parsed.path":"/path","parsed.query":"foo=bar","parsed.ragment":"t=1"}
54
+
55
+ <filter>
56
+ @type query_string_parser
57
+ key_name parsed.query
58
+ hash_value_field query
59
+ # inject_key_prefix query
60
+ # suppress_parse_error_log false
61
+ # ignore_key_not_exist false
62
+ </match>
63
+ # input string of data: {"parsed.query": "foo=bar"}
64
+ # output data: {"query":{"foo":"bar"}}
65
+
66
+ ```
67
+
68
+ **key_name (Required)**
69
+
70
+ Key of the value to be parsed in the record.
71
+
72
+ **hash_value_field (Default: '')**
73
+
74
+ If a value is set, the value after parsing is stored in hash with key specified value.
75
+
76
+ **inject_key_prefix (Default: '')**
77
+
78
+ If you set a value, set the value specified for the key after parsing as prefix.
79
+
80
+ **suppress_parse_error_log (Default: false)**
81
+
82
+ If set to `true`, no error log is output even if parsing fails.
83
+
84
+ **ignore_key_not_exist (Default: false)**
85
+
86
+ If set to `true`, if the field specified by `key_name` does not exist, the record will not be emit to the next stream. That means that the data will be lost there.
87
+
88
+ **ignore_nil (Default: false)**
89
+
90
+ If set to `true`, exclude key if the value after parse is nil.
33
91
 
34
92
  ## Development
35
93
 
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "fluent-plugin-uri-parser"
7
- spec.version = "0.0.2"
7
+ spec.version = "0.1.0"
8
8
  spec.authors = ["Daichi HIRATA"]
9
9
  spec.email = ["bunny.hop.md@gmail.com"]
10
10
  spec.license = "Apache-2.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-uri-parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daichi HIRATA
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-16 00:00:00.000000000 Z
11
+ date: 2017-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd