For other versions, see theVersioned plugin docs.
For questions about the plugin, open a topic in the Discuss forums. For bugs or feature requests, open an issue in Github.For the list of Elastic supported plugins, please consult the Elastic Support Matrix.
This output lets you send events to a generic HTTP(S) endpoint.
This output will execute up to pool_max requests in parallel for performance.Consider this when tuning this plugin for performance.
Additionally, note that when parallel execution is used strict ordering of events is notguaranteed!
Beware, this gem does not yet support codecs. Please use the format option for now.
This plugin supports the following configuration options plus the Common Options described later.
Setting | Input type | Required |
---|---|---|
No |
||
a valid filesystem path |
No |
|
a valid filesystem path |
No |
|
a valid filesystem path |
No |
|
No |
||
No |
||
No |
||
No |
||
string, one of |
No |
|
No |
||
No |
||
string, one of |
Yes |
|
No |
||
No |
||
a valid filesystem path |
No |
|
No |
||
No |
||
No |
||
No |
||
No |
||
No |
||
<<,>> |
No |
|
No |
||
No |
||
No |
||
No |
||
No |
||
a valid filesystem path |
No |
|
No |
||
No |
||
Yes |
||
No |
Also see Common Options for a list of options supported by alloutput plugins.
1
How many times should the client retry a failing URL. We highly recommend NOT setting this valueto zero if keepalive is enabled. Some servers incorrectly end keepalives early requiring a retry!Note: if retry_non_idempotent
is set only GET, HEAD, PUT, DELETE, OPTIONS, and TRACE requests will be retried.
If you need to use a custom X.509 CA (.pem certs) specify the path to that here
If you’d like to use a client certificate (note, most people don’t want this) set the path to the x509 cert here
If you’re using a client certificate specify the path to the encryption key here
10
Timeout (in seconds) to wait for a connection to be established. Default is 10s
Content type
If not specified, this defaults to the following:
true
Enable cookie support. With this enabled the client will persist cookiesacross requests as a normal web browser would. Enabled by default
true
Should redirects be followed? Defaults to true
json
, json_batch
, form
, message
"json"
Set the format of the http body.
If json_batch, each batch of events received by this output will be placedinto a single JSON array and sent in one request. This is particularly usefulfor high throughput scenarios such as sending data between Logstash instaces.
If form, then the body will be the mapping (or whole event) convertedinto a query parameter string, e.g. foo=bar&baz=fizz...
If message, then the body will be the result of formatting the event according to message
Otherwise, the event is sent as json.
Custom headers to useformat is headers => ["X-My-Header", "%{host}"]
false
Enable request compression support. With this enabled the plugin will compresshttp requests using gzip.
put
, post
, patch
, delete
, get
, head
The HTTP Verb. One of "put", "post", "patch", "delete", "get", "head"
If you would like to consider some non-2xx codes to be successesenumerate them here. Responses returning these codes will be considered successes
true
Turn this on to enable HTTP keepalive support. We highly recommend setting automatic_retries
to at leastone with this to fix interactions with broken keepalive implementations.
If you need to use a custom keystore (.jks
) specify that here. This does not work with .pem keys!
Specify the keystore password here.Note, most .jks files created with keytool require a password!
"JKS"
Specify the keystore type here. One of JKS
or PKCS12
. Default is JKS
This lets you choose the structure and parts of the event that are sent.
For example:
mapping => {"foo" => "%{host}" "bar" => "%{type}"}
50
Max number of concurrent connections. Defaults to 50
25
Max number of concurrent connections to a single host. Defaults to 25
If you’d like to use an HTTP proxy . This supports multiple configuration syntaxes:
http://proxy.org:1234
{host => "proxy.org", port => 80, scheme => 'http', user => 'username@host', password => 'password'}
{url => 'http://proxy.org:1234', user => 'username@host', password => 'password'}
60
This module makes it easy to add a very fully configured HTTP client to logstashbased on [Manticore](https://github.com/cheald/manticore).For an example of its usage see https://github.com/logstash-plugins/logstash-input-http_pollerTimeout (in seconds) for the entire request
true
Set this to false if you don’t want this output to retry failed requests
false
If automatic_retries
is enabled this will cause non-idempotent HTTP verbs (such as POST) to be retried.
[429, 500, 502, 503, 504]
If encountered as response codes this plugin will retry these requests
10
Timeout (in seconds) to wait for data on the socket. Default is 10s
If you need to use a custom truststore (.jks
) specify that here. This does not work with .pem certs!
Specify the truststore password here.Note, most .jks files created with keytool require a password!
"JKS"
Specify the truststore type here. One of JKS
or PKCS12
. Default is JKS
URL to use
200
How long to wait before checking if the connection is stale before executing a request on a connection using keepalive.You may want to set this lower, possibly to 0 if you get connection errors regularlyQuoting the Apache commons docs (this client is based Apache Commmons):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.See these docs for more info
The following configuration options are supported by all output plugins:
"plain"
The codec used for output data. Output codecs are a convenient method for encoding your data before it leaves the output without needing a separate filter in your Logstash pipeline.
true
Disable or enable metric logging for this specific plugin instance.By default we record all the metrics we can, but you can disable metrics collectionfor a specific plugin.
Add a unique ID
to the plugin configuration. If no ID is specified, Logstash will generate one.It is strongly recommended to set this ID in your configuration. This is particularly usefulwhen you have two or more plugins of the same type. For example, if you have 2 http outputs.Adding a named ID in this case will help in monitoring Logstash when using the monitoring APIs.
output { http { id => "my_plugin_id" }}