logstash-input-couchdb_changes 3.0.2 → 3.1.0
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.md +6 -0
- data/lib/logstash/inputs/couchdb_changes.rb +17 -4
- data/logstash-input-couchdb_changes.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e92054f4d3f216540befdcd740b28f7ec22dff8
|
4
|
+
data.tar.gz: eb4430e71ac3e1cbab09ea3ed89e106f0377c723
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a911bbfdcc68b45505e3bee5783056375e487dfcd61f316f964bb0dd29fc2731f388df530b905c7fccd5c77a8ba9820fa971c6b5923f5029f6bf285d7280feb
|
7
|
+
data.tar.gz: 832c9d2d9a795903b59ad8a77e7292c124ea21af2539ee451037cce210825ea12df485f6130c9cc979eb14abb5918f72b3de7750ed6380a428be0d2e80cabf55
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## 3.1.0
|
2
|
+
- Fail fast on permission denied accessing the sequence file
|
3
|
+
- Introduced new config 'keep_id'
|
4
|
+
- Fixed hard coded delay in error message
|
5
|
+
- CouchDB hostname resolution failure support
|
6
|
+
|
1
7
|
## 3.0.2
|
2
8
|
- Relax constraint on logstash-core-plugin-api to >= 1.60 <= 2.99
|
3
9
|
|
@@ -64,6 +64,10 @@ class LogStash::Inputs::CouchDBChanges < LogStash::Inputs::Base
|
|
64
64
|
# and that you will unset this value afterwards.
|
65
65
|
config :initial_sequence, :validate => :number
|
66
66
|
|
67
|
+
# Preserve the CouchDB document id "_id" value in the
|
68
|
+
# output.
|
69
|
+
config :keep_id, :validate => :boolean, :default => false
|
70
|
+
|
67
71
|
# Preserve the CouchDB document revision "_rev" value in the
|
68
72
|
# output.
|
69
73
|
config :keep_revision, :validate => :boolean, :default => false
|
@@ -112,7 +116,16 @@ class LogStash::Inputs::CouchDBChanges < LogStash::Inputs::Base
|
|
112
116
|
|
113
117
|
@scheme = @secure ? 'https' : 'http'
|
114
118
|
|
115
|
-
|
119
|
+
if !@initial_sequence.nil?
|
120
|
+
@logger.info("initial_sequence is set, writing to filesystem ...",
|
121
|
+
:initial_sequence => @initial_sequence, :sequence_path => @sequence_path)
|
122
|
+
@sequencedb.write(@initial_sequence)
|
123
|
+
@sequence = @initial_sequence
|
124
|
+
else
|
125
|
+
@logger.info("No initial_sequence set, reading from filesystem ...",
|
126
|
+
:sequence_path => @sequence_path)
|
127
|
+
@sequence = @sequencedb.read
|
128
|
+
end
|
116
129
|
|
117
130
|
end
|
118
131
|
|
@@ -172,8 +185,8 @@ class LogStash::Inputs::CouchDBChanges < LogStash::Inputs::Base
|
|
172
185
|
end
|
173
186
|
end
|
174
187
|
rescue Timeout::Error, Errno::EINVAL, Errno::ECONNRESET, EOFError, Errno::EHOSTUNREACH, Errno::ECONNREFUSED,
|
175
|
-
Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError => e
|
176
|
-
@logger.error("Connection problem encountered: Retrying connection in
|
188
|
+
Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError, SocketError => e
|
189
|
+
@logger.error("Connection problem encountered: Retrying connection in " + @reconnect_delay.to_s + " seconds...", :error => e.to_s, :host => @host.to_s, :port => @port.to_s, :db => @db)
|
177
190
|
retry if reconnect?
|
178
191
|
rescue Errno::EBADF => e
|
179
192
|
@logger.error("Unable to connect: Bad file descriptor: ", :error => e.to_s)
|
@@ -214,7 +227,7 @@ class LogStash::Inputs::CouchDBChanges < LogStash::Inputs::Base
|
|
214
227
|
else
|
215
228
|
hash['doc'] = data['doc']
|
216
229
|
hash['@metadata']['action'] = 'update'
|
217
|
-
hash['doc'].delete('_id')
|
230
|
+
hash['doc'].delete('_id') unless @keep_id
|
218
231
|
hash['doc_as_upsert'] = true
|
219
232
|
hash['doc'].delete('_rev') unless @keep_revision
|
220
233
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-input-couchdb_changes'
|
4
|
-
s.version = '3.0
|
4
|
+
s.version = '3.1.0'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "This input captures the _changes stream from a CouchDB instance"
|
7
7
|
s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-input-couchdb_changes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -155,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
155
155
|
version: '0'
|
156
156
|
requirements: []
|
157
157
|
rubyforge_project:
|
158
|
-
rubygems_version: 2.
|
158
|
+
rubygems_version: 2.4.8
|
159
159
|
signing_key:
|
160
160
|
specification_version: 4
|
161
161
|
summary: This input captures the _changes stream from a CouchDB instance
|