fluent-plugin-mongo 0.7.1 → 0.7.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.
- checksums.yaml +4 -4
- data/ChangeLog +5 -0
- data/Gemfile +1 -1
- data/VERSION +1 -1
- data/lib/fluent/plugin/in_mongo_tail.rb +6 -2
- data/lib/fluent/plugin/mongo_util.rb +1 -1
- data/lib/fluent/plugin/out_mongo.rb +8 -4
- data/lib/fluent/plugin/out_mongo_replset.rb +1 -1
- data/lib/fluent/plugin/out_mongo_tag_collection.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 704336957f5f5ebdec8351e961f38555db15ce16
|
4
|
+
data.tar.gz: f8dc945869ddf4c3e8125b517757371b86067c3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aad06123bf520927bba1e718efaf297f379c98419ce7dc6d1068d2da9a0b86b40d291b017b2d0dfd1b1cb9fc72e766d7f82884e5f7248790fbce47197612b703
|
7
|
+
data.tar.gz: 9b18985959ec858e77680ca8bf21037cfb2b62461f427889c03d5166e156617492d8ceda492a1d2598e44f18c30e14d745708c1136d6fe0260808e90ca300959
|
data/ChangeLog
CHANGED
data/Gemfile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.7.
|
1
|
+
0.7.2
|
@@ -19,6 +19,10 @@ module Fluent
|
|
19
19
|
# To store last ObjectID
|
20
20
|
config_param :id_store_file, :string, :default => nil
|
21
21
|
|
22
|
+
unless method_defined?(:log)
|
23
|
+
define_method(:log) { $log }
|
24
|
+
end
|
25
|
+
|
22
26
|
def initialize
|
23
27
|
super
|
24
28
|
require 'mongo'
|
@@ -71,10 +75,10 @@ module Fluent
|
|
71
75
|
raise ConfigError, "'#{@database}.#{@collection}' is not capped: node = #{@host}:#{@port}" unless collection.capped?
|
72
76
|
collection
|
73
77
|
rescue Mongo::ConnectionFailure => e
|
74
|
-
|
78
|
+
log.fatal "Failed to connect to 'mongod'. Please restart 'fluentd' after 'mongod' started: #{e}"
|
75
79
|
exit!
|
76
80
|
rescue Mongo::OperationFailure => e
|
77
|
-
|
81
|
+
log.fatal "Operation failed. Probably, 'mongod' needs an authentication: #{e}"
|
78
82
|
exit!
|
79
83
|
end
|
80
84
|
end
|
@@ -26,6 +26,10 @@ module Fluent
|
|
26
26
|
|
27
27
|
attr_reader :collection_options, :connection_options
|
28
28
|
|
29
|
+
unless method_defined?(:log)
|
30
|
+
define_method(:log) { $log }
|
31
|
+
end
|
32
|
+
|
29
33
|
def initialize
|
30
34
|
super
|
31
35
|
require 'mongo'
|
@@ -201,18 +205,18 @@ module Fluent
|
|
201
205
|
begin
|
202
206
|
limit = mongod_version >= "1.8.0" ? LIMIT_AFTER_v1_8 : LIMIT_BEFORE_v1_8
|
203
207
|
rescue Mongo::ConnectionFailure => e
|
204
|
-
|
208
|
+
log.fatal "Failed to connect to 'mongod'. Please restart 'fluentd' after 'mongod' started: #{e}"
|
205
209
|
exit!
|
206
210
|
rescue Mongo::OperationFailure => e
|
207
|
-
|
211
|
+
log.fatal "Operation failed. Probably, 'mongod' needs an authentication: #{e}"
|
208
212
|
exit!
|
209
213
|
rescue Exception => e
|
210
|
-
|
214
|
+
log.warn "mongo unknown error #{e}, set #{LIMIT_BEFORE_v1_8} to chunk limit"
|
211
215
|
limit = LIMIT_BEFORE_v1_8
|
212
216
|
end
|
213
217
|
|
214
218
|
if @buffer.buffer_chunk_limit > limit
|
215
|
-
|
219
|
+
log.warn ":buffer_chunk_limit(#{@buffer.buffer_chunk_limit}) is large. Reset :buffer_chunk_limit with #{limit}"
|
216
220
|
limit
|
217
221
|
else
|
218
222
|
@buffer.buffer_chunk_limit
|
@@ -60,7 +60,7 @@ module Fluent
|
|
60
60
|
retries += 1
|
61
61
|
raise e if retries > @num_retries
|
62
62
|
|
63
|
-
|
63
|
+
log.warn "Failed to connect to Replica Set. Try to retry: retry number = #{retries}"
|
64
64
|
sleep 0.5
|
65
65
|
retry
|
66
66
|
end
|
@@ -14,7 +14,7 @@ module Fluent
|
|
14
14
|
@remove_tag_prefix = Regexp.new('^' + Regexp.escape(remove_prefix_collection))
|
15
15
|
end
|
16
16
|
|
17
|
-
|
17
|
+
log.warn "'mongo_tag_collection' deprecated. Please use 'mongo' type with 'tag_mapped' parameter"
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-mongo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masahiro Nakagawa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|