fluent-plugin-mongo 0.6.3 → 0.6.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -181,6 +181,21 @@ So, Mongo plugin resets _buffer_chunk_limit_ if configurated value is larger tha
181
181
  - Before v1.8, max of _buffer_chunk_limit_ is 2MB
182
182
  - After v1.8, max of _buffer_chunk_limit_ is 10MB
183
183
 
184
+ == Disable collection check
185
+
186
+ Mongo plugin checks a collection's configuration to prevent unexpected insertion to existing collection.
187
+ In tag mapped mode, Mongo plugin accesses many collections. In this case, collection checking is not usable
188
+ because current configuration format cannot write multiple values in one parameter.
189
+ So, if you disable this checking, put ```disable_collection_check true``` in match.
190
+
191
+ <match forward.*>
192
+ ...
193
+
194
+ disable_collection_check true
195
+
196
+ ...
197
+ </match>
198
+
184
199
  = Tool
185
200
 
186
201
  You can tail mongo capped collection.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.3
1
+ 0.6.4
@@ -18,6 +18,7 @@ class MongoOutput < BufferedOutput
18
18
  config_param :host, :string, :default => 'localhost'
19
19
  config_param :port, :integer, :default => 27017
20
20
  config_param :ignore_invalid_record, :bool, :default => false
21
+ config_param :disable_collection_check, :bool, :default => false
21
22
  config_param :safe, :bool, :default => true
22
23
 
23
24
  # tag mapping mode
@@ -157,7 +158,7 @@ class MongoOutput < BufferedOutput
157
158
  return @clients[collection_name] if @clients[collection_name]
158
159
 
159
160
  @db ||= get_connection
160
- if @db.collection_names.include?(collection_name)
161
+ if @db.collection_names.include?(collection_name) and !@disable_collection_check
161
162
  collection = @db.collection(collection_name)
162
163
  unless @collection_options[:capped] == collection.capped? # TODO: Verify capped configuration
163
164
  # raise Exception if old collection does not match lastest configuration
@@ -203,7 +204,7 @@ class MongoOutput < BufferedOutput
203
204
  end
204
205
 
205
206
  def mongod_version
206
- db = authenticate(Mongo::Connection.new(@host, @port).db('admin'))
207
+ db = authenticate(Mongo::Connection.new(@host, @port).db(@database))
207
208
  db.command('serverStatus' => 1)['version']
208
209
  end
209
210
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-mongo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-07 00:00:00.000000000Z
12
+ date: 2012-02-16 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fluentd
16
- requirement: &2152356120 !ruby/object:Gem::Requirement
16
+ requirement: &2157066720 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.10.7
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2152356120
24
+ version_requirements: *2157066720
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: mongo
27
- requirement: &2152354440 !ruby/object:Gem::Requirement
27
+ requirement: &2157066160 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -35,10 +35,10 @@ dependencies:
35
35
  version: 1.5.2
36
36
  type: :runtime
37
37
  prerelease: false
38
- version_requirements: *2152354440
38
+ version_requirements: *2157066160
39
39
  - !ruby/object:Gem::Dependency
40
40
  name: rake
41
- requirement: &2152352640 !ruby/object:Gem::Requirement
41
+ requirement: &2157065240 !ruby/object:Gem::Requirement
42
42
  none: false
43
43
  requirements:
44
44
  - - ! '>='
@@ -46,10 +46,10 @@ dependencies:
46
46
  version: 0.9.2
47
47
  type: :development
48
48
  prerelease: false
49
- version_requirements: *2152352640
49
+ version_requirements: *2157065240
50
50
  - !ruby/object:Gem::Dependency
51
51
  name: simplecov
52
- requirement: &2152351520 !ruby/object:Gem::Requirement
52
+ requirement: &2157064640 !ruby/object:Gem::Requirement
53
53
  none: false
54
54
  requirements:
55
55
  - - ! '>='
@@ -57,10 +57,10 @@ dependencies:
57
57
  version: 0.5.4
58
58
  type: :development
59
59
  prerelease: false
60
- version_requirements: *2152351520
60
+ version_requirements: *2157064640
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: rr
63
- requirement: &2152350480 !ruby/object:Gem::Requirement
63
+ requirement: &2157063960 !ruby/object:Gem::Requirement
64
64
  none: false
65
65
  requirements:
66
66
  - - ! '>='
@@ -68,7 +68,7 @@ dependencies:
68
68
  version: 1.0.0
69
69
  type: :development
70
70
  prerelease: false
71
- version_requirements: *2152350480
71
+ version_requirements: *2157063960
72
72
  description: MongoDB plugin for Fluent event collector
73
73
  email: repeatedly@gmail.com
74
74
  executables:
@@ -111,7 +111,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
111
111
  version: '0'
112
112
  segments:
113
113
  - 0
114
- hash: 688925002882805851
114
+ hash: 3092401569410755844
115
115
  required_rubygems_version: !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
@@ -120,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
120
  version: '0'
121
121
  segments:
122
122
  - 0
123
- hash: 688925002882805851
123
+ hash: 3092401569410755844
124
124
  requirements: []
125
125
  rubyforge_project:
126
126
  rubygems_version: 1.8.10