http

 

Synopsis

This plugin supports the following configuration options:

Required configuration options:

http {
    http_method => ...
    url => ...
}

Available configuration options:

Setting Input typeRequiredDefault value

codec

codec

No

"plain"

content_type

string

No

format

string, one of ["json", "form", "message"]

No

"json"

headers

hash

No

http_method

string, one of ["put", "post"]

Yes

mapping

hash

No

message

string

No

url

string

Yes

verify_ssl

boolean

No

true

workers

number

No

1

Details

 

codec

  • Value type is codec
  • Default value is "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.

content_type

  • Value type is string
  • There is no default value for this setting.

Content type

If not specified, this defaults to the following:

  • if format is "json", "application/json"
  • if format is "form", "application/x-www-form-urlencoded"

exclude_tags (DEPRECATED)

  • DEPRECATED WARNING: This configuration item is deprecated and may not be available in future versions.
  • Value type is array
  • Default value is []

Only handle events without any of these tags. Note this check is additional to type and tags.

format

  • Value can be any of: json, form, message
  • Default value is "json"

Set the format of the http body.

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

Otherwise, the event is sent as json.

headers

  • Value type is hash
  • There is no default value for this setting.

Custom headers to use format is headers => ["X-My-Header", "%{host}"]

http_method

  • This is a required setting.
  • Value can be any of: put, post
  • There is no default value for this setting.

What verb to use only put and post are supported for now

mapping

  • Value type is hash
  • There is no default value for this setting.

This lets you choose the structure and parts of the event that are sent.

For example:

mapping => ["foo", "%{host}", "bar", "%{type}"]

message

  • Value type is string
  • There is no default value for this setting.

tags (DEPRECATED)

  • DEPRECATED WARNING: This configuration item is deprecated and may not be available in future versions.
  • Value type is array
  • Default value is []

Only handle events with all of these tags. Note that if you specify a type, the event must also match that type. Optional.

type (DEPRECATED)

  • DEPRECATED WARNING: This configuration item is deprecated and may not be available in future versions.
  • Value type is string
  • Default value is ""

The type to act on. If a type is given, then this output will only act on messages with the same type. See any input plugin’s type attribute for more. Optional.

url

  • This is a required setting.
  • Value type is string
  • There is no default value for this setting.

This output lets you PUT or POST events to a generic HTTP(S) endpoint

Additionally, you are given the option to customize the headers sent as well as basic customization of the event json itself. URL to use

verify_ssl

  • Value type is boolean
  • Default value is true

validate SSL?

workers

  • Value type is number
  • Default value is 1

The number of workers to use for this output. Note that this setting may not be useful for all outputs.