:plugin: redis
:type: input
:default_codec: json

///////////////////////////////////////////
START - GENERATED VARIABLES, DO NOT EDIT!
///////////////////////////////////////////
:version: %VERSION%
:release_date: %RELEASE_DATE%
:changelog_url: %CHANGELOG_URL%
:include_path: ../../../../logstash/docs/include
///////////////////////////////////////////
END - GENERATED VARIABLES, DO NOT EDIT!
///////////////////////////////////////////

[id="plugins-{type}s-{plugin}"]

=== Redis input plugin

include::{include_path}/plugin_header.asciidoc[]

==== Description

This input will read events from a Redis instance; it supports both Redis channels and lists.
The list command (BLPOP) used by Logstash is supported in Redis v1.3.1+, and
the channel commands used by Logstash are found in Redis v1.3.8+.
While you may be able to make these Redis versions work, the best performance
and stability will be found in more recent stable versions.  Versions 2.6.0+
are recommended.

For more information about Redis, see <http://redis.io/>

`batch_count` note: If you use the `batch_count` setting, you *must* use a Redis version 2.6.0 or
newer. Anything older does not support the operations used by batching.


[id="plugins-{type}s-{plugin}-options"]
==== Redis Input Configuration Options

This plugin supports the following configuration options plus the <<plugins-{type}s-{plugin}-common-options>> described later.

[cols="<,<,<",options="header",]
|=======================================================================
|Setting |Input type|Required
| <<plugins-{type}s-{plugin}-batch_count>> |<<number,number>>|No
| <<plugins-{type}s-{plugin}-data_type>> |<<string,string>>, one of `["list", "channel", "pattern_channel"]`|Yes
| <<plugins-{type}s-{plugin}-db>> |<<number,number>>|No
| <<plugins-{type}s-{plugin}-host>> |<<string,string>>|No
| <<plugins-{type}s-{plugin}-path>> |<<string,string>>|No
| <<plugins-{type}s-{plugin}-key>> |<<string,string>>|Yes
| <<plugins-{type}s-{plugin}-password>> |<<password,password>>|No
| <<plugins-{type}s-{plugin}-port>> |<<number,number>>|No
| <<plugins-{type}s-{plugin}-ssl>> |<<boolean,boolean>>|No
| <<plugins-{type}s-{plugin}-threads>> |<<number,number>>|No
| <<plugins-{type}s-{plugin}-timeout>> |<<number,number>>|No
| <<plugins-{type}s-{plugin}-command_map>> |<<hash,hash>>|No
|=======================================================================

Also see <<plugins-{type}s-{plugin}-common-options>> for a list of options supported by all
input plugins.

&nbsp;

[id="plugins-{type}s-{plugin}-batch_count"]
===== `batch_count`

  * Value type is <<number,number>>
  * Default value is `125`

The number of events to return from Redis using EVAL.

[id="plugins-{type}s-{plugin}-data_type"]
===== `data_type`

  * This is a required setting.
  * Value can be any of: `list`, `channel`, `pattern_channel`
  * There is no default value for this setting.

Specify either list or channel.  If `data_type` is `list`, then we will BLPOP the
key.  If `data_type` is `channel`, then we will SUBSCRIBE to the key.
If `data_type` is `pattern_channel`, then we will PSUBSCRIBE to the key.

[id="plugins-{type}s-{plugin}-db"]
===== `db`

  * Value type is <<number,number>>
  * Default value is `0`

The Redis database number.

[id="plugins-{type}s-{plugin}-host"]
===== `host`

  * Value type is <<string,string>>
  * Default value is `"127.0.0.1"`

The hostname of your Redis server.

[id="plugins-{type}s-{plugin}-path"]
===== `path`

  * Value type is <<string,string>>
  * There is no default value for this setting.
  * Path will override Host configuration if both specified.

The unix socket path of your Redis server.

[id="plugins-{type}s-{plugin}-key"]
===== `key`

  * This is a required setting.
  * Value type is <<string,string>>
  * There is no default value for this setting.

The name of a Redis list or channel.

[id="plugins-{type}s-{plugin}-password"]
===== `password`

  * Value type is <<password,password>>
  * There is no default value for this setting.

Password to authenticate with. There is no authentication by default.

[id="plugins-{type}s-{plugin}-port"]
===== `port`

  * Value type is <<number,number>>
  * Default value is `6379`

The port to connect on.

[id="plugins-{type}s-{plugin}-ssl"]
===== `ssl` 

  * Value type is <<boolean,boolean>>
  * Default value is `false`

Enable SSL support.


[id="plugins-{type}s-{plugin}-threads"]
===== `threads`

  * Value type is <<number,number>>
  * Default value is `1`



[id="plugins-{type}s-{plugin}-timeout"]
===== `timeout`

  * Value type is <<number,number>>
  * Default value is `5`

Initial connection timeout in seconds.

[id="plugins-{type}s-{plugin}-command_map"]
===== `command_map`

  * Value type is <<hash,hash>>
  * There is no default value for this setting.
  * key is the default command name, value is the renamed command.

Configure renamed redis commands in the form of "oldname" => "newname".
Redis allows for the renaming or disabling of commands in its protocol, see:  https://redis.io/topics/security

[id="plugins-{type}s-{plugin}-common-options"]
include::{include_path}/{type}.asciidoc[]

:default_codec!: