output {
http {
codec => ... # codec (optional), default: "plain"
content_type => ... # string (optional)
format => ... # string, one of ["json", "form", "message"] (optional), default: "json"
headers => ... # hash (optional)
http_method => ... # string, one of ["put", "post"] (required)
mapping => ... # hash (optional)
message => ... # string (optional)
url => ... # string (required)
verify_ssl => ... # boolean (optional), default: true
workers => ... # number (optional), default: 1
}
}
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
If not specified, this defaults to the following:
Only handle events without any of these tags. Note this check is additional to type and tags.
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 (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 use format is `headers => [“X-My-Header”, “%{host}”]
What verb to use only put and post are supported for now
This lets you choose the structure and parts of the event that are sent.
For example:
mapping => [“foo”, “%{host}”, “bar”, “%{type}”]
Only handle events with all of these tags. Note that if you specify a type, the event must also match that type. Optional.
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.
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
validate SSL?
The number of workers to use for this output. Note that this setting may not be useful for all outputs.