http
edithttp
edit
Synopsis
editThis plugin supports the following configuration options:
Required configuration options:
http { http_method => ... url => ... }
Available configuration options:
Details
edit
codec
edit- 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
edit- 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.
format
edit-
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
edit- 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
edit- 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
edit- 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}"]
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.
url
edit- 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