fluent-plugin-jsonbucket 0.0.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 +15 -0
- data/AUTHORS +1 -0
- data/Gemfile +3 -0
- data/README.rdoc +25 -0
- data/Rakefile +11 -0
- data/fluent-plugin-jsonbucket.gemspec +18 -0
- data/lib/fluent/plugin/out_jsonbucket.rb +21 -0
- metadata +90 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
YWM5NWRhOTlhZjJjODk5ZGI2ZjM1ZTVkM2FkODMwMjIyNWNkYzg4Ng==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
Y2YzMzZmOTA4YWIyZjEzMTE0MjM1NTdmZThhYWQyZjJmYmRlYzdiNg==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
ZGIyZDgzMmFiMDRjNGEwODMyNDQxYzRiYmUzNjE5OGJhNGQ1NWNhYWY0YzU2
|
10
|
+
NmJhMjI5ZTY5NGIxMTVlNjczYmIyM2JlZjA3YWQ1MzZjM2U3NTYzNjkyOTlm
|
11
|
+
NTA3OWU3MDQwYjdiNDdjOGNmZTk0NjBlNTUzZWIwNDMzNjVkYWM=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
MjM5ZGQxYzk2Nzg5OTBjZTkyMDZiNzc4NGExMjBjNjRjZWRhMzA2MTgxZGMx
|
14
|
+
MGMzYjM0YmRkZjQxYjRmMjg0NjFkMDk1ZDQ0NTkyYTEyYmE2ODFkMzA1Mzdh
|
15
|
+
ZjA3M2UyMDk4OWRkM2M4ZmYzZTIyZmNhYzkzNmVlNjFkZjA2NzQ=
|
data/AUTHORS
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
moaikids
|
data/Gemfile
ADDED
data/README.rdoc
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
= counter
|
2
|
+
|
3
|
+
== Overview
|
4
|
+
|
5
|
+
*jsonbucket* is a fluentd output plugin. this plugin process puts a json(msgpack) record into a json bucket.
|
6
|
+
|
7
|
+
ex. {"a":1, "b":2, "c":3 } -> {"bucket": {"a":1, "b":2, "c":3 } }
|
8
|
+
|
9
|
+
== Installation
|
10
|
+
|
11
|
+
== Configuration
|
12
|
+
|
13
|
+
<match pattern>
|
14
|
+
type jsonbucket
|
15
|
+
out_tag OUTPUT_TAG_NAME
|
16
|
+
json_jey OUTPUT_JSON_KEY(default: 'json')
|
17
|
+
</match>
|
18
|
+
|
19
|
+
== Copyright
|
20
|
+
|
21
|
+
Copyright:: Copyright (c) 2013 moaikids
|
22
|
+
License:: Apache License, Version 2.0
|
23
|
+
|
24
|
+
|
25
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
Gem::Specification.new do |gem|
|
3
|
+
gem.name = "fluent-plugin-jsonbucket"
|
4
|
+
gem.version = "0.0.1"
|
5
|
+
gem.authors = ["moaikids"]
|
6
|
+
gem.summary = %q{Fluentd plugin}
|
7
|
+
gem.description = %q{Fluentd plugin}
|
8
|
+
gem.homepage = "https://github.com/moaikids/fluent-plugin-jsonbucket"
|
9
|
+
|
10
|
+
gem.files = `git ls-files`.split($\)
|
11
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
12
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
13
|
+
gem.require_paths = ["lib"]
|
14
|
+
|
15
|
+
gem.add_development_dependency "rake"
|
16
|
+
gem.add_development_dependency "shoulda"
|
17
|
+
gem.add_runtime_dependency "fluentd"
|
18
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Fluent
|
2
|
+
class JsonbucketOutput < Fluent::Output
|
3
|
+
Fluent::Plugin.register_output('jsonbucket', self)
|
4
|
+
config_param :output_tag, :string, :default => nil
|
5
|
+
config_param :json_key, :string, :default => 'json'
|
6
|
+
|
7
|
+
def configure(conf)
|
8
|
+
super
|
9
|
+
unless config.has_key?('output_tag')
|
10
|
+
raise Fluent::ConfigError, "you must set 'output_tag'"
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def emit(tag, es, chain)
|
15
|
+
es.each {|time,record|
|
16
|
+
bucket = {@json_key => record.to_json}
|
17
|
+
Fluent::Engine.emit(@output_tag, time, bucket)
|
18
|
+
}
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
metadata
ADDED
@@ -0,0 +1,90 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fluent-plugin-jsonbucket
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- moaikids
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-08-29 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rake
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ! '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ! '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: shoulda
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ! '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: fluentd
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: Fluentd plugin
|
56
|
+
email:
|
57
|
+
executables: []
|
58
|
+
extensions: []
|
59
|
+
extra_rdoc_files: []
|
60
|
+
files:
|
61
|
+
- AUTHORS
|
62
|
+
- Gemfile
|
63
|
+
- README.rdoc
|
64
|
+
- Rakefile
|
65
|
+
- fluent-plugin-jsonbucket.gemspec
|
66
|
+
- lib/fluent/plugin/out_jsonbucket.rb
|
67
|
+
homepage: https://github.com/moaikids/fluent-plugin-jsonbucket
|
68
|
+
licenses: []
|
69
|
+
metadata: {}
|
70
|
+
post_install_message:
|
71
|
+
rdoc_options: []
|
72
|
+
require_paths:
|
73
|
+
- lib
|
74
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
75
|
+
requirements:
|
76
|
+
- - ! '>='
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '0'
|
79
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ! '>='
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
84
|
+
requirements: []
|
85
|
+
rubyforge_project:
|
86
|
+
rubygems_version: 2.0.7
|
87
|
+
signing_key:
|
88
|
+
specification_version: 4
|
89
|
+
summary: Fluentd plugin
|
90
|
+
test_files: []
|