http

Status: experimental

Synopsis

This is what it might look like in your config file:
output {
  http {
    content_type => ... # string (optional), default: "application/json"
    exclude_tags => ... # array (optional), default: []
    fields => ... # array (optional), default: []
    headers => ... # hash (optional)
    http_method => ... # ["put", "post"] (required)
    mapping => ... # hash (optional)
    tags => ... # array (optional), default: []
    type => ... # string (optional), default: ""
    url => ... # string (required)
    verify_ssl => ... # boolean (optional), default: true
  }
}

Details

content_type

  • Value type is string
  • Default value is "application/json"

Content type

exclude_tags

  • Value type is array
  • Default value is []

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

fields

  • Value type is array
  • Default value is []

Only handle events with all of these fields. Optional.

headers

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

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

http_method (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.

Mapping Normally Logstash will send the json_event as is If you provide a Logstash hash here, it will be mapped into a JSON structure e.g. mapping => ["foo", "%{@source_host}", "bar", "%{@type}"] with generate a json like so: {"foo":"localhost.domain.com","bar":"stdin-type"}`

tags

  • 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

  • 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 (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?


This is documentation from lib/logstash/outputs/http.rb