httpedit

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

Securityedit

This 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

 

Synopsisedit

This plugin supports the following configuration options:

Required configuration options:

http {
}

Available configuration options:

Setting Input type Required Default value

add_field

hash

No

{}

additional_codecs

hash

No

{"application/json"=>"json"}

codec

codec

No

"plain"

host

string

No

"0.0.0.0"

keystore

a valid filesystem path

No

keystore_password

password

No

password

password

No

port

number

No

8080

ssl

boolean

No

false

tags

array

No

threads

number

No

4

type

string

No

user

string

No

Detailsedit

 

add_fieldedit

  • Value type is hash
  • Default value is {}

Add a field to an event

additional_codecsedit

  • Value type is hash
  • Default value is {"application/json"=>"json"}

Here you can set how to decode specific content-types in the body of the request. By default, the plain codec will be used

charset (DEPRECATED)edit

  • DEPRECATED WARNING: This configuration item is deprecated and may not be available in future versions. <li> Value type is string
  • There is no default value for this setting.

The character encoding used in this input. Examples include UTF-8 and cp1252

This setting is useful if your log files are in Latin-1 (aka cp1252) or in another character set other than UTF-8.

This only affects plain format logs since json is UTF-8 already.

codecedit

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

debug (DEPRECATED)edit

  • DEPRECATED WARNING: This configuration item is deprecated and may not be available in future versions.
  • Value type is boolean
  • Default value is false

format (DEPRECATED)edit

  • DEPRECATED WARNING: This configuration item is deprecated and may not be available in future versions.
  • Value can be any of: plain, json, json_event, msgpack_event
  • There is no default value for this setting.

The format of input data (plain, json, json_event)

hostedit

  • Value type is string
  • Default value is "0.0.0.0"

The host or ip to bind

keystoreedit

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

The JKS keystore to validate the client’s certificates

keystore_passwordedit

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

Set the truststore password

message_format (DEPRECATED)edit

  • DEPRECATED WARNING: This configuration item is deprecated and may not be available in future versions.
  • Value type is string
  • There is no default value for this setting.

If format is json, an event sprintf string to build what the display @message should be given (defaults to the raw JSON). sprintf format strings look like %{fieldname}

If format is json_event, ALL fields except for @type are expected to be present. Not receiving all fields will cause unexpected results.

passwordedit

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

Password for basic authentication

portedit

  • Value type is number
  • Default value is 8080

The TCP port to bind to

ssledit

  • Value type is boolean
  • Default value is false

Enable SSL

tagsedit

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

threadsedit

  • Value type is number
  • Default value is 4

Maximum number of threads to use

typeedit

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

useredit

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

Username for basic authorization