http
edithttp
editUsing this input you can receive single or multiline events over http(s).
Applications can send a HTTP POST request with a body to the endpoint started by this
input and Logstash will convert it into an event for subsequent processing. Users
can pass plain text, JSON, or any formatted data and use a corresponding codec with this
input. For Content-Type application/json
the json
codec is used, but for all other
data formats, plain
codec is used.
This input can also be used to receive webhook requests to integrate with other services and applications. By taking advantage of the vast plugin ecosystem available in Logstash you can trigger actionable events right from your application.
Security
editThis plugin supports standard HTTP basic authentication headers to identify the requester. You can pass in an username, password combination while sending data to this input
You can also setup SSL and send data securely over https, with an option of validating the client’s certificate. Currently, the certificate setup is through Java Keystore format
Synopsis
editThis plugin supports the following configuration options:
Required configuration options:
http { }
Available configuration options:
Setting | Input type | Required | Default value |
---|---|---|---|
No |
|
||
No |
|
||
No |
|
||
No |
|
||
a valid filesystem path |
No |
||
No |
|||
No |
|||
No |
|
||
No |
|
||
No |
|
||
No |
|||
No |
|
||
No |
|||
No |
|||
string, one of |
No |
|
Details
edit
additional_codecs
edit- Value type is hash
-
Default value is
{"application/json"=>"json"}
Apply specific codecs for specific content types. The default codec will be applied only after this list is checked and no codec for the request’s content-type is found
codec
edit- Value type is codec
-
Default value is
"plain"
The codec used for input data. Input codecs are a convenient method for decoding your data before it enters the input, without needing a separate filter in your Logstash pipeline.
host
edit- Value type is string
-
Default value is
"0.0.0.0"
Codec used to decode the incoming data. This codec will be used as a fall-back if the content-type is not found in the "additional_codecs" hash The host or ip to bind
keystore
edit- Value type is path
- There is no default value for this setting.
The JKS keystore to validate the client’s certificates
keystore_password
edit- Value type is password
- There is no default value for this setting.
Set the truststore password
password
edit- Value type is password
- There is no default value for this setting.
Password for basic authorization
response_headers
edit- Value type is hash
-
Default value is
{"Content-Type"=>"text/plain"}
specify a custom set of response headers
tags
edit- Value type is array
- There is no default value for this setting.
Add any number of arbitrary tags to your event.
This can help with processing later.
type
edit- Value type is string
- There is no default value for this setting.
Add a type
field to all events handled by this input.
Types are used mainly for filter activation.
The type is stored as part of the event itself, so you can also use the type to search for it in Kibana.
If you try to set a type on an event that already has one (for example when you send an event from a shipper to an indexer) then a new input will not override the existing type. A type set at the shipper stays with that event for its life even when sent to another Logstash server.
user
edit- Value type is string
- There is no default value for this setting.
Username for basic authorization
verify_mode
edit-
Value can be any of:
none
,peer
,force_peer
-
Default value is
"none"
Set the client certificate verification method. Valid methods: none, peer, force_peer