fluent-plugin-time_parser 0.0.1 → 0.0.2
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.
- data/.gitignore +4 -0
- data/README.md +63 -0
- data/fluent-plugin-time_parser.gemspec +4 -2
- data/test/plugin/test_out_time_parser.rb +0 -1
- metadata +32 -17
- checksums.yaml +0 -15
- data/lib/fluent/.DS_Store +0 -0
data/.gitignore
ADDED
data/README.md
CHANGED
@@ -1,6 +1,69 @@
|
|
1
1
|
# fluent-plugin-time_parser
|
2
2
|
|
3
3
|
## Component
|
4
|
+
TimeParserOutput
|
5
|
+
|
6
|
+
Based on the great extract-query-params plugin by @Kentaro (https://github.com/kentaro/fluent-plugin-extract_query_params).
|
7
|
+
Will take a time attribute and will extract the date and the hour for a given time zone.
|
8
|
+
|
9
|
+
## wat?!
|
10
|
+
|
11
|
+
```
|
12
|
+
<match test.**>
|
13
|
+
type time_parser
|
14
|
+
|
15
|
+
key time
|
16
|
+
add_tag_prefix extracted.
|
17
|
+
time_zone Tokyo
|
18
|
+
</match>
|
19
|
+
```
|
20
|
+
|
21
|
+
And you feed such a value into fluentd:
|
22
|
+
|
23
|
+
```
|
24
|
+
"test" => {
|
25
|
+
"time" => ""2013-04-14T06:14:36Z""
|
26
|
+
}
|
27
|
+
```
|
28
|
+
|
29
|
+
Then you'll get re-emmited tag/record-s below:
|
30
|
+
|
31
|
+
```
|
32
|
+
"extracted.test" => {
|
33
|
+
"time" => "2013-04-14T06:14:36Z"
|
34
|
+
"date" => "2013-04-14",
|
35
|
+
"hour" => "15"
|
36
|
+
}
|
37
|
+
```
|
38
|
+
## Configuration
|
39
|
+
|
40
|
+
### key
|
41
|
+
|
42
|
+
`key` is used to point a key whose value contains the time you want to parse.
|
43
|
+
|
44
|
+
### remove_tag_prefix, remove_tag_suffix, add_tag_prefix, add_tag_suffix
|
45
|
+
|
46
|
+
These params are included from `Fluent::HandleTagNameMixin`. See the code for details.
|
47
|
+
|
48
|
+
You must add at least one of these params.
|
49
|
+
|
50
|
+
### time_zone
|
51
|
+
|
52
|
+
time_parser is using TZInfo (http://tzinfo.rubyforge.org/) library to handle time zones.
|
53
|
+
|
54
|
+
## Installation
|
55
|
+
|
56
|
+
Add this line to your application's Gemfile:
|
57
|
+
|
58
|
+
gem 'fluent-plugin-time_parser'
|
59
|
+
|
60
|
+
And then execute:
|
61
|
+
|
62
|
+
$ bundle
|
63
|
+
|
64
|
+
Or install it yourself as:
|
65
|
+
|
66
|
+
$ gem install fluent-plugin-time_parser
|
4
67
|
|
5
68
|
|
6
69
|
## Contributing
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |gem|
|
2
2
|
gem.name = 'fluent-plugin-time_parser'
|
3
|
-
gem.version = '0.0.
|
3
|
+
gem.version = '0.0.2'
|
4
4
|
gem.authors = ['Carlos Donderis']
|
5
5
|
gem.email = ['cdonderis@gmail.com']
|
6
6
|
gem.homepage = 'http://github.com/cads/fluent-plugin-time_parser'
|
@@ -14,5 +14,7 @@ Gem::Specification.new do |gem|
|
|
14
14
|
|
15
15
|
gem.add_development_dependency 'rake'
|
16
16
|
gem.add_development_dependency 'fluentd'
|
17
|
+
gem.add_development_dependency 'tzinfo'
|
18
|
+
gem.add_runtime_dependency 'tzinfo'
|
17
19
|
gem.add_runtime_dependency 'fluentd'
|
18
|
-
end
|
20
|
+
end
|
metadata
CHANGED
@@ -1,57 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-time_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Carlos Donderis
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2013-
|
12
|
+
date: 2013-05-01 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: rake
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirement: &70338037769140 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
19
|
- - ! '>='
|
18
20
|
- !ruby/object:Gem::Version
|
19
21
|
version: '0'
|
20
22
|
type: :development
|
21
23
|
prerelease: false
|
22
|
-
version_requirements:
|
23
|
-
requirements:
|
24
|
-
- - ! '>='
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
24
|
+
version_requirements: *70338037769140
|
27
25
|
- !ruby/object:Gem::Dependency
|
28
26
|
name: fluentd
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
27
|
+
requirement: &70338037768700 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
30
29
|
requirements:
|
31
30
|
- - ! '>='
|
32
31
|
- !ruby/object:Gem::Version
|
33
32
|
version: '0'
|
34
33
|
type: :development
|
35
34
|
prerelease: false
|
36
|
-
version_requirements:
|
35
|
+
version_requirements: *70338037768700
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: tzinfo
|
38
|
+
requirement: &70338037768280 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
37
40
|
requirements:
|
38
41
|
- - ! '>='
|
39
42
|
- !ruby/object:Gem::Version
|
40
43
|
version: '0'
|
44
|
+
type: :development
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *70338037768280
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
48
|
+
name: tzinfo
|
49
|
+
requirement: &70338037784180 !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
44
51
|
requirements:
|
45
52
|
- - ! '>='
|
46
53
|
- !ruby/object:Gem::Version
|
47
54
|
version: '0'
|
48
55
|
type: :runtime
|
49
56
|
prerelease: false
|
50
|
-
version_requirements:
|
57
|
+
version_requirements: *70338037784180
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: fluentd
|
60
|
+
requirement: &70338037783740 !ruby/object:Gem::Requirement
|
61
|
+
none: false
|
51
62
|
requirements:
|
52
63
|
- - ! '>='
|
53
64
|
- !ruby/object:Gem::Version
|
54
65
|
version: '0'
|
66
|
+
type: :runtime
|
67
|
+
prerelease: false
|
68
|
+
version_requirements: *70338037783740
|
55
69
|
description: Fluentd plugin to parse the time parameter.
|
56
70
|
email:
|
57
71
|
- cdonderis@gmail.com
|
@@ -59,37 +73,38 @@ executables: []
|
|
59
73
|
extensions: []
|
60
74
|
extra_rdoc_files: []
|
61
75
|
files:
|
76
|
+
- .gitignore
|
62
77
|
- Gemfile
|
63
78
|
- LICENSE
|
64
79
|
- README.md
|
65
80
|
- Rakefile
|
66
81
|
- fluent-plugin-time_parser.gemspec
|
67
|
-
- lib/fluent/.DS_Store
|
68
82
|
- lib/fluent/plugin/out_time_parser.rb
|
69
83
|
- test/plugin/test_out_time_parser.rb
|
70
84
|
- test/test_helper.rb
|
71
85
|
homepage: http://github.com/cads/fluent-plugin-time_parser
|
72
86
|
licenses: []
|
73
|
-
metadata: {}
|
74
87
|
post_install_message:
|
75
88
|
rdoc_options: []
|
76
89
|
require_paths:
|
77
90
|
- lib
|
78
91
|
required_ruby_version: !ruby/object:Gem::Requirement
|
92
|
+
none: false
|
79
93
|
requirements:
|
80
94
|
- - ! '>='
|
81
95
|
- !ruby/object:Gem::Version
|
82
96
|
version: '0'
|
83
97
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
|
+
none: false
|
84
99
|
requirements:
|
85
100
|
- - ! '>='
|
86
101
|
- !ruby/object:Gem::Version
|
87
102
|
version: '0'
|
88
103
|
requirements: []
|
89
104
|
rubyforge_project:
|
90
|
-
rubygems_version:
|
105
|
+
rubygems_version: 1.8.11
|
91
106
|
signing_key:
|
92
|
-
specification_version:
|
107
|
+
specification_version: 3
|
93
108
|
summary: Fluentd plugin to parse the time parameter.
|
94
109
|
test_files:
|
95
110
|
- test/plugin/test_out_time_parser.rb
|
checksums.yaml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
---
|
2
|
-
!binary "U0hBMQ==":
|
3
|
-
metadata.gz: !binary |-
|
4
|
-
Yjk2ZDdlYTEwNDRjM2EyNDY3MmU3N2RhYjc2YjI3MmI0NWE3Nzk3Mw==
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
YzE2YzcxM2IxYTg2NjVhYjgzYmE2MjY2OGJlNDZmYzlkYTQ3NDA3Zg==
|
7
|
-
!binary "U0hBNTEy":
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
MDIwMjU5NzdiZjFjZDczZWU5ODU4ZTc4ZTkwNjdhNDI1MDlmNGQwNzA0YTky
|
10
|
-
MWM2ODIyZDZkMjE4NDE5ZjRlNDc0NDNkOWU0YTgwZmNlOGYyODA4ZWFmMzY1
|
11
|
-
MmU4OGI4OGE0ZmE4ODI3NGVkODgyNWM4YzI5OGM0Y2ZjMWU5OWQ=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
ZWE1NmFmYjFmMWE4MTU4MTE4YzE3YTlmMTQyMjYxZDc4OGYyMjEwM2YwMTY5
|
14
|
-
MmQ1ZDY2MjRkNGZiY2UwOTNjYmUzMzBjZGJkNWUyYTNjMjhjNTUxMjAwYzIz
|
15
|
-
ZmI5MTJmNDM4MzgyODgzZmE4NDFjMGEyMDRmZmZkNzdmZDI3NDg=
|
data/lib/fluent/.DS_Store
DELETED
Binary file
|