httpedit

 

Synopsisedit

This plugin supports the following configuration options:

Required configuration options:

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

Available configuration options:

Setting Input type Required Default 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

Detailsedit

 

codecedit

  • 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_typeedit

  • 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)edit

  • 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. Optional.

formatedit

  • 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.

headersedit

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

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

http_methodedit

  • 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

mappingedit

  • 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}"]

messageedit

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

tags (DEPRECATED)edit

  • 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. Optional.

type (DEPRECATED)edit

  • 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.

urledit

  • 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_ssledit

  • Value type is boolean
  • Default value is true

validate SSL?

workersedit

  • 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.