fluent-plugin-mongo 0.6.0 → 0.6.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.
- data/README.rdoc +59 -22
- data/VERSION +1 -1
- data/fluent-plugin-mongo.gemspec +3 -0
- metadata +60 -54
data/README.rdoc
CHANGED
@@ -4,15 +4,19 @@
|
|
4
4
|
|
5
5
|
=== MongoOutput
|
6
6
|
|
7
|
-
Store
|
7
|
+
Store Fluentd event as a MongoDB Document to MongoDB database.
|
8
8
|
|
9
|
-
MongoOutput set
|
10
|
-
You set _false_ to
|
9
|
+
MongoOutput set "time" field to a document by default.
|
10
|
+
You set _false_ to _include_time_key_ parameter if you disable this behaivor.
|
11
11
|
|
12
12
|
==== tag mapped mode
|
13
13
|
|
14
14
|
Tag mapped to MongoDB collection automatically.
|
15
15
|
|
16
|
+
=== MongoReplSetOutput
|
17
|
+
|
18
|
+
Replica Set version of MongoOutput
|
19
|
+
|
16
20
|
=== MongoBackupOutput
|
17
21
|
|
18
22
|
Store fluent-event to local capped collection for backup.
|
@@ -34,7 +38,7 @@ Tail capped collection to input data.
|
|
34
38
|
host fluenter
|
35
39
|
port 10000
|
36
40
|
|
37
|
-
#
|
41
|
+
# Set 'capped' if you want to use capped collection
|
38
42
|
capped
|
39
43
|
capped_size 100m
|
40
44
|
|
@@ -43,7 +47,7 @@ Tail capped collection to input data.
|
|
43
47
|
|
44
48
|
==== Tag mapped mode
|
45
49
|
|
46
|
-
Use
|
50
|
+
Use _tag_mapped_ parameter.
|
47
51
|
|
48
52
|
If tag name is "foo.bar", auto create collection "foo.bar" and insert data.
|
49
53
|
|
@@ -51,7 +55,7 @@ If tag name is "foo.bar", auto create collection "foo.bar" and insert data.
|
|
51
55
|
type mongo
|
52
56
|
database fluent
|
53
57
|
|
54
|
-
#
|
58
|
+
# Set 'tag_mapped' if you want to use tag mapped mode.
|
55
59
|
tag_mapped
|
56
60
|
|
57
61
|
# If tag is "forward.foo.bar", then prefix "forward." is removed.
|
@@ -69,36 +73,69 @@ If tag name is "foo.bar", auto create collection "foo.bar" and insert data.
|
|
69
73
|
===== Broken data as a BSON
|
70
74
|
|
71
75
|
Fluentd event sometimes has an invalid record as a BSON.
|
72
|
-
In such case,
|
76
|
+
In such case, Mongo plugin marshals an invalid record using Marshal.dump
|
73
77
|
and re-inserts its to same collection.
|
74
78
|
|
75
|
-
|
79
|
+
If passed following invalid record:
|
76
80
|
|
77
81
|
{"key1": "invalid value", "key2": "valid value", "time": ISODate("2012-01-15T21:09:53Z") }
|
78
82
|
|
79
|
-
to
|
83
|
+
then Mongo plugin converts this record to following format:
|
84
|
+
|
85
|
+
{"__broken_data": Marshal.dump result of {"key1": "invalid value", "key2": "valid value"}, "time": ISODate("2012-01-15T21:09:53Z") }
|
86
|
+
|
87
|
+
Mongo-Ruby-Driver cannot detect an invalid attribute,
|
88
|
+
so Mongo plugin marshals all attributes excluding Fluentd keys("tag_key" and "time_key").
|
80
89
|
|
81
|
-
|
90
|
+
If you want to ignore an invalid record, set _true_ to _ignore_invalid_record_ parameter in match.
|
82
91
|
|
83
|
-
|
84
|
-
|
92
|
+
<match forward.*>
|
93
|
+
...
|
94
|
+
|
95
|
+
# ignore invalid documents at write operation
|
96
|
+
ignore_invalid_document true
|
85
97
|
|
86
|
-
|
98
|
+
...
|
99
|
+
</match>
|
87
100
|
|
88
101
|
===== Buffer size limitation
|
89
102
|
|
90
|
-
|
91
|
-
Because MongoDB and
|
92
|
-
If total object size gets over the size limitation,
|
93
|
-
MongoDB returns error or
|
103
|
+
Mongo plugin has the limitation of buffer size.
|
104
|
+
Because MongoDB and mongo-ruby-driver checks the total object size at each insertion.
|
105
|
+
If total object size gets over the size limitation, then
|
106
|
+
MongoDB returns error or mongo-ruby-driver raises an exception.
|
107
|
+
|
108
|
+
So, Mongo plugin resets _buffer_chunk_limit_ if configurated value is larger than above limitation:
|
109
|
+
- Before v1.8, max of _buffer_chunk_limit_ is 2MB
|
110
|
+
- After v1.8, max of _buffer_chunk_limit_ is 10MB
|
94
111
|
|
95
|
-
|
96
|
-
|
97
|
-
|
112
|
+
=== MongoReplSetOutput
|
113
|
+
|
114
|
+
Use _mongo_replset_ type in match.
|
115
|
+
|
116
|
+
<match mongo.**>
|
117
|
+
type mongo_replset
|
118
|
+
database fluent
|
119
|
+
collection logs
|
120
|
+
|
121
|
+
# each node separated by ','
|
122
|
+
nodes localhost:27017,localhost:27018,localhost:27019
|
123
|
+
|
124
|
+
# num_retries is threshold at failover, default is 60.
|
125
|
+
# If retry count reached this threshold, mongo plugin raises an exception.
|
126
|
+
num_retries 30
|
127
|
+
|
128
|
+
# following optional parameters passed to ReplSetConnection of mongo-ruby-driver.
|
129
|
+
# See mongo-ruby-driver docs for more detail.
|
130
|
+
#name replset_name
|
131
|
+
#read secondary
|
132
|
+
#refresh_mode sync
|
133
|
+
#refresh_interval 60
|
134
|
+
</match>
|
98
135
|
|
99
136
|
=== MongoBackupOutput
|
100
137
|
|
101
|
-
Use
|
138
|
+
Use _mongo_backup_ type in match. _mongo_backup_ alwalys use capped collection.
|
102
139
|
|
103
140
|
<match ...>
|
104
141
|
type mongo_backup
|
@@ -113,7 +150,7 @@ Use mongo_backup type in match. mongo_backup alwalys use capped collection.
|
|
113
150
|
|
114
151
|
=== Tail capped collection
|
115
152
|
|
116
|
-
Use
|
153
|
+
Use _mongo_tail_ type in source.
|
117
154
|
|
118
155
|
<source>
|
119
156
|
type mongo_tail
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.6.
|
1
|
+
0.6.1
|
data/fluent-plugin-mongo.gemspec
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
$:.push File.expand_path('../lib', __FILE__)
|
3
3
|
|
4
|
+
# Fixup the YAML engine mismatch problem
|
5
|
+
YAML::ENGINE.yamler = "syck"
|
6
|
+
|
4
7
|
Gem::Specification.new do |gem|
|
5
8
|
gem.name = "fluent-plugin-mongo"
|
6
9
|
gem.description = "MongoDB plugin for Fluent event collector"
|
metadata
CHANGED
@@ -1,78 +1,81 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-mongo
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.0
|
3
|
+
version: !ruby/object:Gem::Version
|
5
4
|
prerelease:
|
5
|
+
version: 0.6.1
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Masahiro Nakagawa
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
12
|
+
|
13
|
+
date: 2012-01-17 00:00:00 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
15
16
|
name: fluentd
|
16
|
-
requirement: &
|
17
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
17
18
|
none: false
|
18
|
-
requirements:
|
19
|
-
- -
|
20
|
-
- !ruby/object:Gem::Version
|
19
|
+
requirements:
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
21
22
|
version: 0.10.7
|
22
23
|
type: :runtime
|
23
24
|
prerelease: false
|
24
|
-
version_requirements: *
|
25
|
-
- !ruby/object:Gem::Dependency
|
25
|
+
version_requirements: *id001
|
26
|
+
- !ruby/object:Gem::Dependency
|
26
27
|
name: mongo
|
27
|
-
requirement: &
|
28
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
28
29
|
none: false
|
29
|
-
requirements:
|
30
|
-
- - =
|
31
|
-
- !ruby/object:Gem::Version
|
30
|
+
requirements:
|
31
|
+
- - "="
|
32
|
+
- !ruby/object:Gem::Version
|
32
33
|
version: 1.5.2
|
33
34
|
type: :runtime
|
34
35
|
prerelease: false
|
35
|
-
version_requirements: *
|
36
|
-
- !ruby/object:Gem::Dependency
|
36
|
+
version_requirements: *id002
|
37
|
+
- !ruby/object:Gem::Dependency
|
37
38
|
name: rake
|
38
|
-
requirement: &
|
39
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
39
40
|
none: false
|
40
|
-
requirements:
|
41
|
-
- -
|
42
|
-
- !ruby/object:Gem::Version
|
41
|
+
requirements:
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
43
44
|
version: 0.9.2
|
44
45
|
type: :development
|
45
46
|
prerelease: false
|
46
|
-
version_requirements: *
|
47
|
-
- !ruby/object:Gem::Dependency
|
47
|
+
version_requirements: *id003
|
48
|
+
- !ruby/object:Gem::Dependency
|
48
49
|
name: simplecov
|
49
|
-
requirement: &
|
50
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
50
51
|
none: false
|
51
|
-
requirements:
|
52
|
-
- -
|
53
|
-
- !ruby/object:Gem::Version
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
54
55
|
version: 0.5.4
|
55
56
|
type: :development
|
56
57
|
prerelease: false
|
57
|
-
version_requirements: *
|
58
|
-
- !ruby/object:Gem::Dependency
|
58
|
+
version_requirements: *id004
|
59
|
+
- !ruby/object:Gem::Dependency
|
59
60
|
name: rr
|
60
|
-
requirement: &
|
61
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
61
62
|
none: false
|
62
|
-
requirements:
|
63
|
-
- -
|
64
|
-
- !ruby/object:Gem::Version
|
63
|
+
requirements:
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
65
66
|
version: 1.0.0
|
66
67
|
type: :development
|
67
68
|
prerelease: false
|
68
|
-
version_requirements: *
|
69
|
+
version_requirements: *id005
|
69
70
|
description: MongoDB plugin for Fluent event collector
|
70
71
|
email: repeatedly@gmail.com
|
71
|
-
executables:
|
72
|
+
executables:
|
72
73
|
- mongo-tail
|
73
74
|
extensions: []
|
75
|
+
|
74
76
|
extra_rdoc_files: []
|
75
|
-
|
77
|
+
|
78
|
+
files:
|
76
79
|
- .gitignore
|
77
80
|
- .gitmodules
|
78
81
|
- .travis.yml
|
@@ -95,35 +98,38 @@ files:
|
|
95
98
|
- test/test_helper.rb
|
96
99
|
homepage: https://github.com/fluent/fluent-plugin-mongo
|
97
100
|
licenses: []
|
101
|
+
|
98
102
|
post_install_message:
|
99
103
|
rdoc_options: []
|
100
|
-
|
104
|
+
|
105
|
+
require_paths:
|
101
106
|
- lib
|
102
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
107
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
103
108
|
none: false
|
104
|
-
requirements:
|
105
|
-
- -
|
106
|
-
- !ruby/object:Gem::Version
|
107
|
-
|
108
|
-
segments:
|
109
|
+
requirements:
|
110
|
+
- - ">="
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
hash: -2592226509051705447
|
113
|
+
segments:
|
109
114
|
- 0
|
110
|
-
|
111
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
115
|
+
version: "0"
|
116
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
112
117
|
none: false
|
113
|
-
requirements:
|
114
|
-
- -
|
115
|
-
- !ruby/object:Gem::Version
|
116
|
-
|
117
|
-
segments:
|
118
|
+
requirements:
|
119
|
+
- - ">="
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
hash: -2592226509051705447
|
122
|
+
segments:
|
118
123
|
- 0
|
119
|
-
|
124
|
+
version: "0"
|
120
125
|
requirements: []
|
126
|
+
|
121
127
|
rubyforge_project:
|
122
128
|
rubygems_version: 1.8.10
|
123
129
|
signing_key:
|
124
130
|
specification_version: 3
|
125
131
|
summary: MongoDB plugin for Fluent event collector
|
126
|
-
test_files:
|
132
|
+
test_files:
|
127
133
|
- test/plugin/in_mongo_tail.rb
|
128
134
|
- test/plugin/out_mongo.rb
|
129
135
|
- test/plugin/out_mongo_tag_collection.rb
|