logstash-output-elasticsearch 0.1.17-java → 0.1.18-java

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 892bc7d06569d4f9d371f2e315f9700485fc91e8
4
- data.tar.gz: 9d958f6d8988a6538edc418bc44e17bbf35f0e30
3
+ metadata.gz: 6c15f51be4dc3f93e48d5d7e01e1ee395841778b
4
+ data.tar.gz: 321c5c48cb9ce8affcd7c9f59c2b8e608e97bdc8
5
5
  SHA512:
6
- metadata.gz: e21bd143609fb613da9cf6610ddcbfba709b16f911b970eb55c06ac281359f503bd72ca204cb0e16cc3cbd3c49d4d69af188acc39606f3ba02a780d1b4dfc141
7
- data.tar.gz: 01ddb6020c95252d8282aa6aaebabda56958f4312798e6d04239f7300cdad5ae48d8e13210ab5ede65608427d859f3eb706f41d860ffa1a8e9666a4b3667a140
6
+ metadata.gz: a3a3269e0803283108adff84fdbc491ff751f9a76a60970222201855bff5cfbc5c94c3d5418f76ef527a9d835220900272e066630a87246ab3c259a7b6119834
7
+ data.tar.gz: a06952883180222eef76c94b6b612ec937d5cd6557bcac9d84de00814f9ee1207ba074de53046651ede0dd392481510c013894c0a7b1b0f8e57035d66e64b4d8
@@ -35,6 +35,8 @@ require 'logstash-output-elasticsearch_jars.rb'
35
35
  # Elasticsearch to Logstash)
36
36
  class LogStash::Outputs::ElasticSearch < LogStash::Outputs::Base
37
37
  include Stud::Buffer
38
+ RETRYABLE_CODES = [429, 503]
39
+ SUCCESS_CODES = [200, 201]
38
40
 
39
41
  config_name "elasticsearch"
40
42
 
@@ -413,11 +415,17 @@ class LogStash::Outputs::ElasticSearch < LogStash::Outputs::Base
413
415
  @submit_mutex.unlock
414
416
  end
415
417
  if bulk_response["errors"]
416
- failed_actions = actions.select.with_index {|_,i| [429, 503].include?(bulk_response['statuses'][i]) }
417
- unless failed_actions.empty?
418
- @logger.debug "#{failed_actions.size}/#{actions.size} events were unsuccessful in sending"
419
- retry_push(failed_actions)
418
+ actions_with_responses = actions.zip(bulk_response['statuses'])
419
+ actions_to_retry = []
420
+ actions_with_responses.each do |action, resp_code|
421
+ if RETRYABLE_CODES.include?(resp_code)
422
+ @logger.warn "retrying failed action with response code: #{resp_code}"
423
+ actions_to_retry << action
424
+ elsif not SUCCESS_CODES.include?(resp_code)
425
+ @logger.warn "failed action with response of #{resp_code}, dropping action: #{action}"
426
+ end
420
427
  end
428
+ retry_push(actions_to_retry)
421
429
  end
422
430
  end
423
431
 
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-output-elasticsearch'
4
- s.version = '0.1.17'
4
+ s.version = '0.1.18'
5
5
  s.licenses = ['apache-2.0']
6
6
  s.summary = "Logstash Output to Elasticsearch"
7
7
  s.description = "Output events to elasticsearch"
metadata CHANGED
@@ -1,30 +1,39 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-elasticsearch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.17
4
+ version: 0.1.18
5
5
  platform: java
6
6
  authors:
7
7
  - Elasticsearch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-26 00:00:00.000000000 Z
11
+ date: 2015-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
+ name: concurrent-ruby
15
+ version_requirements: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
14
20
  requirement: !ruby/object:Gem::Requirement
15
21
  requirements:
16
22
  - - '>='
17
23
  - !ruby/object:Gem::Version
18
24
  version: '0'
19
- name: concurrent-ruby
20
25
  prerelease: false
21
26
  type: :runtime
27
+ - !ruby/object:Gem::Dependency
28
+ name: elasticsearch
22
29
  version_requirements: !ruby/object:Gem::Requirement
23
30
  requirements:
24
31
  - - '>='
25
32
  - !ruby/object:Gem::Version
26
- version: '0'
27
- - !ruby/object:Gem::Dependency
33
+ version: 1.0.6
34
+ - - ~>
35
+ - !ruby/object:Gem::Version
36
+ version: '1.0'
28
37
  requirement: !ruby/object:Gem::Requirement
29
38
  requirements:
30
39
  - - '>='
@@ -33,18 +42,18 @@ dependencies:
33
42
  - - ~>
34
43
  - !ruby/object:Gem::Version
35
44
  version: '1.0'
36
- name: elasticsearch
37
45
  prerelease: false
38
46
  type: :runtime
47
+ - !ruby/object:Gem::Dependency
48
+ name: stud
39
49
  version_requirements: !ruby/object:Gem::Requirement
40
50
  requirements:
41
51
  - - '>='
42
52
  - !ruby/object:Gem::Version
43
- version: 1.0.6
53
+ version: 0.0.17
44
54
  - - ~>
45
55
  - !ruby/object:Gem::Version
46
- version: '1.0'
47
- - !ruby/object:Gem::Dependency
56
+ version: '0.0'
48
57
  requirement: !ruby/object:Gem::Requirement
49
58
  requirements:
50
59
  - - '>='
@@ -53,33 +62,25 @@ dependencies:
53
62
  - - ~>
54
63
  - !ruby/object:Gem::Version
55
64
  version: '0.0'
56
- name: stud
57
65
  prerelease: false
58
66
  type: :runtime
67
+ - !ruby/object:Gem::Dependency
68
+ name: cabin
59
69
  version_requirements: !ruby/object:Gem::Requirement
60
70
  requirements:
61
- - - '>='
62
- - !ruby/object:Gem::Version
63
- version: 0.0.17
64
71
  - - ~>
65
72
  - !ruby/object:Gem::Version
66
- version: '0.0'
67
- - !ruby/object:Gem::Dependency
73
+ version: '0.6'
68
74
  requirement: !ruby/object:Gem::Requirement
69
75
  requirements:
70
76
  - - ~>
71
77
  - !ruby/object:Gem::Version
72
78
  version: '0.6'
73
- name: cabin
74
79
  prerelease: false
75
80
  type: :runtime
76
- version_requirements: !ruby/object:Gem::Requirement
77
- requirements:
78
- - - ~>
79
- - !ruby/object:Gem::Version
80
- version: '0.6'
81
81
  - !ruby/object:Gem::Dependency
82
- requirement: !ruby/object:Gem::Requirement
82
+ name: logstash-core
83
+ version_requirements: !ruby/object:Gem::Requirement
83
84
  requirements:
84
85
  - - '>='
85
86
  - !ruby/object:Gem::Version
@@ -87,10 +88,7 @@ dependencies:
87
88
  - - <
88
89
  - !ruby/object:Gem::Version
89
90
  version: 2.0.0
90
- name: logstash-core
91
- prerelease: false
92
- type: :runtime
93
- version_requirements: !ruby/object:Gem::Requirement
91
+ requirement: !ruby/object:Gem::Requirement
94
92
  requirements:
95
93
  - - '>='
96
94
  - !ruby/object:Gem::Version
@@ -98,104 +96,106 @@ dependencies:
98
96
  - - <
99
97
  - !ruby/object:Gem::Version
100
98
  version: 2.0.0
99
+ prerelease: false
100
+ type: :runtime
101
101
  - !ruby/object:Gem::Dependency
102
+ name: ftw
103
+ version_requirements: !ruby/object:Gem::Requirement
104
+ requirements:
105
+ - - ~>
106
+ - !ruby/object:Gem::Version
107
+ version: 0.0.42
102
108
  requirement: !ruby/object:Gem::Requirement
103
109
  requirements:
104
110
  - - ~>
105
111
  - !ruby/object:Gem::Version
106
112
  version: 0.0.42
107
- name: ftw
108
113
  prerelease: false
109
114
  type: :development
115
+ - !ruby/object:Gem::Dependency
116
+ name: logstash-input-generator
110
117
  version_requirements: !ruby/object:Gem::Requirement
111
118
  requirements:
112
- - - ~>
119
+ - - '>='
113
120
  - !ruby/object:Gem::Version
114
- version: 0.0.42
115
- - !ruby/object:Gem::Dependency
121
+ version: '0'
116
122
  requirement: !ruby/object:Gem::Requirement
117
123
  requirements:
118
124
  - - '>='
119
125
  - !ruby/object:Gem::Version
120
126
  version: '0'
121
- name: logstash-input-generator
122
127
  prerelease: false
123
128
  type: :development
129
+ - !ruby/object:Gem::Dependency
130
+ name: manticore
124
131
  version_requirements: !ruby/object:Gem::Requirement
125
132
  requirements:
126
- - - '>='
133
+ - - ~>
127
134
  - !ruby/object:Gem::Version
128
- version: '0'
129
- - !ruby/object:Gem::Dependency
135
+ version: '0.3'
130
136
  requirement: !ruby/object:Gem::Requirement
131
137
  requirements:
132
138
  - - ~>
133
139
  - !ruby/object:Gem::Version
134
140
  version: '0.3'
135
- name: manticore
136
141
  prerelease: false
137
142
  type: :runtime
143
+ - !ruby/object:Gem::Dependency
144
+ name: jar-dependencies
138
145
  version_requirements: !ruby/object:Gem::Requirement
139
146
  requirements:
140
- - - ~>
147
+ - - '='
141
148
  - !ruby/object:Gem::Version
142
- version: '0.3'
143
- - !ruby/object:Gem::Dependency
149
+ version: 0.1.7
144
150
  requirement: !ruby/object:Gem::Requirement
145
151
  requirements:
146
152
  - - '='
147
153
  - !ruby/object:Gem::Version
148
154
  version: 0.1.7
149
- name: jar-dependencies
150
155
  prerelease: false
151
156
  type: :runtime
157
+ - !ruby/object:Gem::Dependency
158
+ name: ruby-maven
152
159
  version_requirements: !ruby/object:Gem::Requirement
153
160
  requirements:
154
161
  - - '='
155
162
  - !ruby/object:Gem::Version
156
- version: 0.1.7
157
- - !ruby/object:Gem::Dependency
163
+ version: 3.1.1.0.8
158
164
  requirement: !ruby/object:Gem::Requirement
159
165
  requirements:
160
166
  - - '='
161
167
  - !ruby/object:Gem::Version
162
168
  version: 3.1.1.0.8
163
- name: ruby-maven
164
169
  prerelease: false
165
170
  type: :runtime
171
+ - !ruby/object:Gem::Dependency
172
+ name: maven-tools
166
173
  version_requirements: !ruby/object:Gem::Requirement
167
174
  requirements:
168
175
  - - '='
169
176
  - !ruby/object:Gem::Version
170
- version: 3.1.1.0.8
171
- - !ruby/object:Gem::Dependency
177
+ version: 1.0.7
172
178
  requirement: !ruby/object:Gem::Requirement
173
179
  requirements:
174
180
  - - '='
175
181
  - !ruby/object:Gem::Version
176
182
  version: 1.0.7
177
- name: maven-tools
178
183
  prerelease: false
179
184
  type: :runtime
185
+ - !ruby/object:Gem::Dependency
186
+ name: logstash-devutils
180
187
  version_requirements: !ruby/object:Gem::Requirement
181
188
  requirements:
182
- - - '='
189
+ - - '>='
183
190
  - !ruby/object:Gem::Version
184
- version: 1.0.7
185
- - !ruby/object:Gem::Dependency
191
+ version: '0'
186
192
  requirement: !ruby/object:Gem::Requirement
187
193
  requirements:
188
194
  - - '>='
189
195
  - !ruby/object:Gem::Version
190
196
  version: '0'
191
- name: logstash-devutils
192
197
  prerelease: false
193
198
  type: :development
194
- version_requirements: !ruby/object:Gem::Requirement
195
- requirements:
196
- - - '>='
197
- - !ruby/object:Gem::Version
198
- version: '0'
199
199
  description: Output events to elasticsearch
200
200
  email: info@elasticsearch.com
201
201
  executables: []
@@ -236,7 +236,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
236
236
  requirements:
237
237
  - jar 'org.elasticsearch:elasticsearch', '1.4.0'
238
238
  rubyforge_project:
239
- rubygems_version: 2.4.5
239
+ rubygems_version: 2.1.9
240
240
  signing_key:
241
241
  specification_version: 4
242
242
  summary: Logstash Output to Elasticsearch