Http output plugin v5.2.0

Getting Help

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.

Description

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 not
guaranteed!

Beware, this gem does not yet support codecs. Please use the format option for now.

Http Output Configuration Options

This plugin supports the following configuration options plus the Common Options described later.

automatic_retries

How many times should the client retry a failing URL. We highly recommend NOT setting this value
to 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.

follow_redirects

format

Value can be any of: json, json_batch, form, message

Default value is "json"

Set the format of the http body.

If json_batch, each batch of events received by this output will be placed
into a single JSON array and sent in one request. This is particularly useful
for high throughput scenarios such as sending data between Logstash instaces.

If form, then the body will be the mapping (or whole event) converted
into 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

url

validate_after_inactivity

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 regularly
Quoting 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

Common Options

The following configuration options are supported by all output plugins:

id

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 useful
when 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.