fluent-plugin-mongo 0.6.11 → 0.6.12
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +6 -0
- data/README.rdoc +3 -0
- data/VERSION +1 -1
- data/lib/fluent/plugin/in_mongo_tail.rb +3 -2
- metadata +2 -8
data/ChangeLog
CHANGED
data/README.rdoc
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.6.
|
1
|
+
0.6.12
|
@@ -11,6 +11,7 @@ class MongoTailInput < Input
|
|
11
11
|
config_param :collection, :string
|
12
12
|
config_param :host, :string, :default => 'localhost'
|
13
13
|
config_param :port, :integer, :default => 27017
|
14
|
+
config_param :wait_time, :integer, :default => 1
|
14
15
|
|
15
16
|
config_param :tag, :string, :default => nil
|
16
17
|
config_param :tag_key, :string, :default => nil
|
@@ -69,7 +70,7 @@ class MongoTailInput < Input
|
|
69
70
|
db = authenticate(Mongo::Connection.new(@host, @port).db(@database))
|
70
71
|
raise ConfigError, "'#{@database}.#{@collection}' not found: node = #{@host}:#{@port}" unless db.collection_names.include?(@collection)
|
71
72
|
collection = db.collection(@collection)
|
72
|
-
raise ConfigError, "'#{@database}.#{@collection}' is not capped: node = #{@host}:#{@port}" unless collection.capped
|
73
|
+
raise ConfigError, "'#{@database}.#{@collection}' is not capped: node = #{@host}:#{@port}" unless [1, true].include?(collection.stats['capped']) # older version(2.0.x or earlier) returns 1
|
73
74
|
collection
|
74
75
|
rescue Mongo::ConnectionFailure => e
|
75
76
|
$log.fatal "Failed to connect to 'mongod'. Please restart 'fluentd' after 'mongod' started: #{e}"
|
@@ -105,7 +106,7 @@ class MongoTailInput < Input
|
|
105
106
|
# Should use MultiEventStream?
|
106
107
|
Engine.emit(tag, time, doc)
|
107
108
|
else
|
108
|
-
sleep
|
109
|
+
sleep @wait_time
|
109
110
|
end
|
110
111
|
}
|
111
112
|
rescue
|
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.
|
4
|
+
version: 0.6.12
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-12-
|
12
|
+
date: 2012-12-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fluentd
|
@@ -134,18 +134,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
134
134
|
- - ! '>='
|
135
135
|
- !ruby/object:Gem::Version
|
136
136
|
version: '0'
|
137
|
-
segments:
|
138
|
-
- 0
|
139
|
-
hash: -452154936217966637
|
140
137
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
141
138
|
none: false
|
142
139
|
requirements:
|
143
140
|
- - ! '>='
|
144
141
|
- !ruby/object:Gem::Version
|
145
142
|
version: '0'
|
146
|
-
segments:
|
147
|
-
- 0
|
148
|
-
hash: -452154936217966637
|
149
143
|
requirements: []
|
150
144
|
rubyforge_project:
|
151
145
|
rubygems_version: 1.8.23
|