logstash-output-http 4.2.0 → 4.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3b4a026e5f3a42c48d00794b751d1611669b3e40
4
- data.tar.gz: d0dc53c6a6dbc21e76e0cf9f949e2999aeea4eda
3
+ metadata.gz: bfd8cc82edeae5ec3a8ee6b7eaf9e591aca0447f
4
+ data.tar.gz: 0f4927f0bba5e2b77684c1199fedf77d2b36aeb3
5
5
  SHA512:
6
- metadata.gz: 04740829ac241f0f35cb36a199e84d31a27ac20764af5bdcb2ed496d6deb1b34f949579a984447de2f57b808eb130b1673a2a748c99965f2f43aa7d926cdf965
7
- data.tar.gz: ecd0e6c6dce00ecc73b3b7d85a476a8384eddeb6f659495c8e18cd75f294d750e9b4c37b5125193017006f7c9ab0e97f005355f027874083405542416bf80371
6
+ metadata.gz: ab226dcaceff11f6f70fc3e1ec81e562ce828c50d966a77db353352052d6c694993b4881cdfd23715927f97e1fbebc41d2c2beb2f1129f483a303393b56c09fe
7
+ data.tar.gz: 3543f311fe68b5d974eee988ff3369f07af75a0be13e48c7909d6fa16e5cf787496dc4732877f91d97239f1589748d01853398817c13db45e3bfdb07af483ae8
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
+ ## 4.3.0
2
+ - Add `user` and `password` options to support HTTP basic auth
3
+
1
4
  ## 4.2.0
2
5
  - Allow nested array in field definition, See https://github.com/logstash-plugins/logstash-output-http/pull/53
6
+
3
7
  ## 4.1.0
4
8
  - Allow nested field definitions in `mappings`
5
9
 
@@ -0,0 +1,380 @@
1
+ :plugin: http
2
+ :type: output
3
+
4
+ ///////////////////////////////////////////
5
+ START - GENERATED VARIABLES, DO NOT EDIT!
6
+ ///////////////////////////////////////////
7
+ :version: %VERSION%
8
+ :release_date: %RELEASE_DATE%
9
+ :changelog_url: %CHANGELOG_URL%
10
+ :include_path: ../../../logstash/docs/include
11
+ ///////////////////////////////////////////
12
+ END - GENERATED VARIABLES, DO NOT EDIT!
13
+ ///////////////////////////////////////////
14
+
15
+ [id="plugins-{type}-{plugin}"]
16
+
17
+ === Http
18
+
19
+ include::{include_path}/plugin_header.asciidoc[]
20
+
21
+ ==== Description
22
+
23
+
24
+
25
+ [id="plugins-{type}s-{plugin}-options"]
26
+ ==== Http Output Configuration Options
27
+
28
+ This plugin supports the following configuration options plus the <<plugins-{type}s-common-options>> described later.
29
+
30
+ [cols="<,<,<",options="header",]
31
+ |=======================================================================
32
+ |Setting |Input type|Required
33
+ | <<plugins-{type}s-{plugin}-automatic_retries>> |<<number,number>>|No
34
+ | <<plugins-{type}s-{plugin}-cacert>> |a valid filesystem path|No
35
+ | <<plugins-{type}s-{plugin}-client_cert>> |a valid filesystem path|No
36
+ | <<plugins-{type}s-{plugin}-client_key>> |a valid filesystem path|No
37
+ | <<plugins-{type}s-{plugin}-connect_timeout>> |<<number,number>>|No
38
+ | <<plugins-{type}s-{plugin}-content_type>> |<<string,string>>|No
39
+ | <<plugins-{type}s-{plugin}-cookies>> |<<boolean,boolean>>|No
40
+ | <<plugins-{type}s-{plugin}-follow_redirects>> |<<boolean,boolean>>|No
41
+ | <<plugins-{type}s-{plugin}-format>> |<<string,string>>, one of `["json", "form", "message"]`|No
42
+ | <<plugins-{type}s-{plugin}-headers>> |<<hash,hash>>|No
43
+ | <<plugins-{type}s-{plugin}-http_method>> |<<string,string>>, one of `["put", "post", "patch", "delete", "get", "head"]`|Yes
44
+ | <<plugins-{type}s-{plugin}-ignorable_codes>> |<<number,number>>|No
45
+ | <<plugins-{type}s-{plugin}-keepalive>> |<<boolean,boolean>>|No
46
+ | <<plugins-{type}s-{plugin}-keystore>> |a valid filesystem path|No
47
+ | <<plugins-{type}s-{plugin}-keystore_password>> |<<password,password>>|No
48
+ | <<plugins-{type}s-{plugin}-keystore_type>> |<<string,string>>|No
49
+ | <<plugins-{type}s-{plugin}-mapping>> |<<hash,hash>>|No
50
+ | <<plugins-{type}s-{plugin}-message>> |<<string,string>>|No
51
+ | <<plugins-{type}s-{plugin}-pool_max>> |<<number,number>>|No
52
+ | <<plugins-{type}s-{plugin}-pool_max_per_route>> |<<number,number>>|No
53
+ | <<plugins-{type}s-{plugin}-proxy>> |<<,>>|No
54
+ | <<plugins-{type}s-{plugin}-request_timeout>> |<<number,number>>|No
55
+ | <<plugins-{type}s-{plugin}-retry_failed>> |<<boolean,boolean>>|No
56
+ | <<plugins-{type}s-{plugin}-retry_non_idempotent>> |<<boolean,boolean>>|No
57
+ | <<plugins-{type}s-{plugin}-retryable_codes>> |<<number,number>>|No
58
+ | <<plugins-{type}s-{plugin}-socket_timeout>> |<<number,number>>|No
59
+ | <<plugins-{type}s-{plugin}-ssl_certificate_validation>> |<<boolean,boolean>>|No
60
+ | <<plugins-{type}s-{plugin}-truststore>> |a valid filesystem path|No
61
+ | <<plugins-{type}s-{plugin}-truststore_password>> |<<password,password>>|No
62
+ | <<plugins-{type}s-{plugin}-truststore_type>> |<<string,string>>|No
63
+ | <<plugins-{type}s-{plugin}-url>> |<<string,string>>|Yes
64
+ | <<plugins-{type}s-{plugin}-validate_after_inactivity>> |<<number,number>>|No
65
+ |=======================================================================
66
+
67
+ Also see <<plugins-{type}s-common-options>> for a list of options supported by all
68
+ output plugins.
69
+
70
+ &nbsp;
71
+
72
+ [id="plugins-{type}s-{plugin}-automatic_retries"]
73
+ ===== `automatic_retries`
74
+
75
+ * Value type is <<number,number>>
76
+ * Default value is `1`
77
+
78
+ How many times should the client retry a failing URL. We highly recommend NOT setting this value
79
+ to zero if keepalive is enabled. Some servers incorrectly end keepalives early requiring a retry!
80
+ Note: if `retry_non_idempotent` is set only GET, HEAD, PUT, DELETE, OPTIONS, and TRACE requests will be retried.
81
+
82
+ [id="plugins-{type}s-{plugin}-cacert"]
83
+ ===== `cacert`
84
+
85
+ * Value type is <<path,path>>
86
+ * There is no default value for this setting.
87
+
88
+ If you need to use a custom X.509 CA (.pem certs) specify the path to that here
89
+
90
+ [id="plugins-{type}s-{plugin}-client_cert"]
91
+ ===== `client_cert`
92
+
93
+ * Value type is <<path,path>>
94
+ * There is no default value for this setting.
95
+
96
+ If you'd like to use a client certificate (note, most people don't want this) set the path to the x509 cert here
97
+
98
+ [id="plugins-{type}s-{plugin}-client_key"]
99
+ ===== `client_key`
100
+
101
+ * Value type is <<path,path>>
102
+ * There is no default value for this setting.
103
+
104
+ If you're using a client certificate specify the path to the encryption key here
105
+
106
+ [id="plugins-{type}s-{plugin}-connect_timeout"]
107
+ ===== `connect_timeout`
108
+
109
+ * Value type is <<number,number>>
110
+ * Default value is `10`
111
+
112
+ Timeout (in seconds) to wait for a connection to be established. Default is `10s`
113
+
114
+ [id="plugins-{type}s-{plugin}-content_type"]
115
+ ===== `content_type`
116
+
117
+ * Value type is <<string,string>>
118
+ * There is no default value for this setting.
119
+
120
+ Content type
121
+
122
+ If not specified, this defaults to the following:
123
+
124
+ * if format is "json", "application/json"
125
+ * if format is "form", "application/x-www-form-urlencoded"
126
+
127
+ [id="plugins-{type}s-{plugin}-cookies"]
128
+ ===== `cookies`
129
+
130
+ * Value type is <<boolean,boolean>>
131
+ * Default value is `true`
132
+
133
+ Enable cookie support. With this enabled the client will persist cookies
134
+ across requests as a normal web browser would. Enabled by default
135
+
136
+ [id="plugins-{type}s-{plugin}-follow_redirects"]
137
+ ===== `follow_redirects`
138
+
139
+ * Value type is <<boolean,boolean>>
140
+ * Default value is `true`
141
+
142
+ Should redirects be followed? Defaults to `true`
143
+
144
+ [id="plugins-{type}s-{plugin}-format"]
145
+ ===== `format`
146
+
147
+ * Value can be any of: `json`, `form`, `message`
148
+ * Default value is `"json"`
149
+
150
+ Set the format of the http body.
151
+
152
+ If form, then the body will be the mapping (or whole event) converted
153
+ into a query parameter string, e.g. `foo=bar&baz=fizz...`
154
+
155
+ If message, then the body will be the result of formatting the event according to message
156
+
157
+ Otherwise, the event is sent as json.
158
+
159
+ [id="plugins-{type}s-{plugin}-headers"]
160
+ ===== `headers`
161
+
162
+ * Value type is <<hash,hash>>
163
+ * There is no default value for this setting.
164
+
165
+ Custom headers to use
166
+ format is `headers => ["X-My-Header", "%{host}"]`
167
+
168
+ [id="plugins-{type}s-{plugin}-http_method"]
169
+ ===== `http_method`
170
+
171
+ * This is a required setting.
172
+ * Value can be any of: `put`, `post`, `patch`, `delete`, `get`, `head`
173
+ * There is no default value for this setting.
174
+
175
+ The HTTP Verb. One of "put", "post", "patch", "delete", "get", "head"
176
+
177
+ [id="plugins-{type}s-{plugin}-ignorable_codes"]
178
+ ===== `ignorable_codes`
179
+
180
+ * Value type is <<number,number>>
181
+ * There is no default value for this setting.
182
+
183
+ If you would like to consider some non-2xx codes to be successes
184
+ enumerate them here. Responses returning these codes will be considered successes
185
+
186
+ [id="plugins-{type}s-{plugin}-keepalive"]
187
+ ===== `keepalive`
188
+
189
+ * Value type is <<boolean,boolean>>
190
+ * Default value is `true`
191
+
192
+ Turn this on to enable HTTP keepalive support. We highly recommend setting `automatic_retries` to at least
193
+ one with this to fix interactions with broken keepalive implementations.
194
+
195
+ [id="plugins-{type}s-{plugin}-keystore"]
196
+ ===== `keystore`
197
+
198
+ * Value type is <<path,path>>
199
+ * There is no default value for this setting.
200
+
201
+ If you need to use a custom keystore (`.jks`) specify that here. This does not work with .pem keys!
202
+
203
+ [id="plugins-{type}s-{plugin}-keystore_password"]
204
+ ===== `keystore_password`
205
+
206
+ * Value type is <<password,password>>
207
+ * There is no default value for this setting.
208
+
209
+ Specify the keystore password here.
210
+ Note, most .jks files created with keytool require a password!
211
+
212
+ [id="plugins-{type}s-{plugin}-keystore_type"]
213
+ ===== `keystore_type`
214
+
215
+ * Value type is <<string,string>>
216
+ * Default value is `"JKS"`
217
+
218
+ Specify the keystore type here. One of `JKS` or `PKCS12`. Default is `JKS`
219
+
220
+ [id="plugins-{type}s-{plugin}-mapping"]
221
+ ===== `mapping`
222
+
223
+ * Value type is <<hash,hash>>
224
+ * There is no default value for this setting.
225
+
226
+ This lets you choose the structure and parts of the event that are sent.
227
+
228
+
229
+ For example:
230
+ [source,ruby]
231
+ mapping => {"foo" => "%{host}"
232
+ "bar" => "%{type}"}
233
+
234
+ [id="plugins-{type}s-{plugin}-message"]
235
+ ===== `message`
236
+
237
+ * Value type is <<string,string>>
238
+ * There is no default value for this setting.
239
+
240
+
241
+
242
+ [id="plugins-{type}s-{plugin}-pool_max"]
243
+ ===== `pool_max`
244
+
245
+ * Value type is <<number,number>>
246
+ * Default value is `50`
247
+
248
+ Max number of concurrent connections. Defaults to `50`
249
+
250
+ [id="plugins-{type}s-{plugin}-pool_max_per_route"]
251
+ ===== `pool_max_per_route`
252
+
253
+ * Value type is <<number,number>>
254
+ * Default value is `25`
255
+
256
+ Max number of concurrent connections to a single host. Defaults to `25`
257
+
258
+ [id="plugins-{type}s-{plugin}-proxy"]
259
+ ===== `proxy`
260
+
261
+ * Value type is <<string,string>>
262
+ * There is no default value for this setting.
263
+
264
+ If you'd like to use an HTTP proxy . This supports multiple configuration syntaxes:
265
+
266
+ 1. Proxy host in form: `http://proxy.org:1234`
267
+ 2. Proxy host in form: `{host => "proxy.org", port => 80, scheme => 'http', user => 'username@host', password => 'password'}`
268
+ 3. Proxy host in form: `{url => 'http://proxy.org:1234', user => 'username@host', password => 'password'}`
269
+
270
+ [id="plugins-{type}s-{plugin}-request_timeout"]
271
+ ===== `request_timeout`
272
+
273
+ * Value type is <<number,number>>
274
+ * Default value is `60`
275
+
276
+ This module makes it easy to add a very fully configured HTTP client to logstash
277
+ based on [Manticore](https://github.com/cheald/manticore).
278
+ For an example of its usage see https://github.com/logstash-plugins/logstash-input-http_poller
279
+ Timeout (in seconds) for the entire request
280
+
281
+ [id="plugins-{type}s-{plugin}-retry_failed"]
282
+ ===== `retry_failed`
283
+
284
+ * Value type is <<boolean,boolean>>
285
+ * Default value is `true`
286
+
287
+ Set this to false if you don't want this output to retry failed requests
288
+
289
+ [id="plugins-{type}s-{plugin}-retry_non_idempotent"]
290
+ ===== `retry_non_idempotent`
291
+
292
+ * Value type is <<boolean,boolean>>
293
+ * Default value is `false`
294
+
295
+ If `automatic_retries` is enabled this will cause non-idempotent HTTP verbs (such as POST) to be retried.
296
+
297
+ [id="plugins-{type}s-{plugin}-retryable_codes"]
298
+ ===== `retryable_codes`
299
+
300
+ * Value type is <<number,number>>
301
+ * Default value is `[429, 500, 502, 503, 504]`
302
+
303
+ If encountered as response codes this plugin will retry these requests
304
+
305
+ [id="plugins-{type}s-{plugin}-socket_timeout"]
306
+ ===== `socket_timeout`
307
+
308
+ * Value type is <<number,number>>
309
+ * Default value is `10`
310
+
311
+ Timeout (in seconds) to wait for data on the socket. Default is `10s`
312
+
313
+ [id="plugins-{type}s-{plugin}-ssl_certificate_validation"]
314
+ ===== `ssl_certificate_validation`
315
+
316
+ * Value type is <<boolean,boolean>>
317
+ * Default value is `true`
318
+
319
+ Set this to false to disable SSL/TLS certificate validation
320
+ Note: setting this to false is generally considered insecure!
321
+
322
+ [id="plugins-{type}s-{plugin}-truststore"]
323
+ ===== `truststore`
324
+
325
+ * Value type is <<path,path>>
326
+ * There is no default value for this setting.
327
+
328
+ If you need to use a custom truststore (`.jks`) specify that here. This does not work with .pem certs!
329
+
330
+ [id="plugins-{type}s-{plugin}-truststore_password"]
331
+ ===== `truststore_password`
332
+
333
+ * Value type is <<password,password>>
334
+ * There is no default value for this setting.
335
+
336
+ Specify the truststore password here.
337
+ Note, most .jks files created with keytool require a password!
338
+
339
+ [id="plugins-{type}s-{plugin}-truststore_type"]
340
+ ===== `truststore_type`
341
+
342
+ * Value type is <<string,string>>
343
+ * Default value is `"JKS"`
344
+
345
+ Specify the truststore type here. One of `JKS` or `PKCS12`. Default is `JKS`
346
+
347
+ [id="plugins-{type}s-{plugin}-url"]
348
+ ===== `url`
349
+
350
+ * This is a required setting.
351
+ * Value type is <<string,string>>
352
+ * There is no default value for this setting.
353
+
354
+ This output lets you send events to a
355
+ generic HTTP(S) endpoint
356
+
357
+ This output will execute up to 'pool_max' requests in parallel for performance.
358
+ Consider this when tuning this plugin for performance.
359
+
360
+ Additionally, note that when parallel execution is used strict ordering of events is not
361
+ guaranteed!
362
+
363
+ Beware, this gem does not yet support codecs. Please use the 'format' option for now.
364
+ URL to use
365
+
366
+ [id="plugins-{type}s-{plugin}-validate_after_inactivity"]
367
+ ===== `validate_after_inactivity`
368
+
369
+ * Value type is <<number,number>>
370
+ * Default value is `200`
371
+
372
+ How long to wait before checking if the connection is stale before executing a request on a connection using keepalive.
373
+ # You may want to set this lower, possibly to 0 if you get connection errors regularly
374
+ Quoting the Apache commons docs (this client is based Apache Commmons):
375
+ 'Defines period of inactivity in milliseconds after which persistent connections must be re-validated prior to being leased to the consumer. Non-positive value passed to this method disables connection validation. This check helps detect connections that have become stale (half-closed) while kept inactive in the pool.'
376
+ See https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/impl/conn/PoolingHttpClientConnectionManager.html#setValidateAfterInactivity(int)[these docs for more info]
377
+
378
+
379
+
380
+ include::{include_path}/{type}.asciidoc[]
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-output-http'
3
- s.version = '4.2.0'
3
+ s.version = '4.3.0'
4
4
  s.licenses = ['Apache License (2.0)']
5
5
  s.summary = "This output lets you `PUT` or `POST` events to a generic HTTP(S) endpoint"
6
6
  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"
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.require_paths = ["lib"]
11
11
 
12
12
  # Files
13
- s.files = Dir['lib/**/*','spec/**/*','vendor/**/*','*.gemspec','*.md','CONTRIBUTORS','Gemfile','LICENSE','NOTICE.TXT']
13
+ s.files = Dir["lib/**/*","spec/**/*","*.gemspec","*.md","CONTRIBUTORS","Gemfile","LICENSE","NOTICE.TXT", "vendor/jar-dependencies/**/*.jar", "vendor/jar-dependencies/**/*.rb", "VERSION", "docs/**/*"]
14
14
 
15
15
  # Tests
16
16
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
20
20
 
21
21
  # Gem dependencies
22
22
  s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99"
23
- s.add_runtime_dependency "logstash-mixin-http_client", ">= 2.2.1", "< 5.0.0"
23
+ s.add_runtime_dependency "logstash-mixin-http_client", ">= 5.1.0", "< 6.0.0"
24
24
 
25
25
  s.add_development_dependency 'logstash-devutils'
26
26
  s.add_development_dependency 'sinatra'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.0
4
+ version: 4.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-28 00:00:00.000000000 Z
11
+ date: 2017-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -35,10 +35,10 @@ dependencies:
35
35
  requirements:
36
36
  - - ">="
37
37
  - !ruby/object:Gem::Version
38
- version: 2.2.1
38
+ version: 5.1.0
39
39
  - - "<"
40
40
  - !ruby/object:Gem::Version
41
- version: 5.0.0
41
+ version: 6.0.0
42
42
  name: logstash-mixin-http_client
43
43
  prerelease: false
44
44
  type: :runtime
@@ -46,10 +46,10 @@ dependencies:
46
46
  requirements:
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: 2.2.1
49
+ version: 5.1.0
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
- version: 5.0.0
52
+ version: 6.0.0
53
53
  - !ruby/object:Gem::Dependency
54
54
  requirement: !ruby/object:Gem::Requirement
55
55
  requirements:
@@ -104,6 +104,7 @@ files:
104
104
  - LICENSE
105
105
  - NOTICE.TXT
106
106
  - README.md
107
+ - docs/index.asciidoc
107
108
  - lib/logstash/outputs/http.rb
108
109
  - logstash-output-http.gemspec
109
110
  - spec/outputs/http_spec.rb