This output will send events to a Redis queue using RPUSH. The RPUSH command is supported in Redis v0.0.7+. Using PUBLISH to a channel requires at least 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/
output {
redis {
batch => ... # boolean (optional), default: false
batch_events => ... # number (optional), default: 50
batch_timeout => ... # number (optional), default: 5
codec => ... # codec (optional), default: "plain"
congestion_interval => ... # number (optional), default: 1
congestion_threshold => ... # number (optional), default: 0
data_type => ... # string, one of ["list", "channel"] (optional)
db => ... # number (optional), default: 0
host => ... # array (optional), default: ["127.0.0.1"]
key => ... # string (optional)
password => ... # password (optional)
port => ... # number (optional), default: 6379
reconnect_interval => ... # number (optional), default: 1
shuffle_hosts => ... # boolean (optional), default: true
timeout => ... # number (optional), default: 5
workers => ... # number (optional), default: 1
}
}
Set to true if you want Redis to batch up values and send 1 RPUSH command
instead of one command per value to push on the list. Note that this only
works with data_type="list"
mode right now.
If true, we send an RPUSH every “batch_events” events or
“batch_timeout” seconds (whichever comes first).
Only supported for data_type
is “list”.
If batch is set to true, the number of events we queue up for an RPUSH.
If batch is set to true, the maximum amount of time between RPUSH commands when there are pending events to flush.
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.
How often to check for congestion. Default is one second. Zero means to check on every event.
In case Redis data_type
is “list” and has more than @congestion_threshold items,
block until someone consumes them and reduces congestion, otherwise if there are
no consumers Redis will run out of memory, unless it was configured with OOM protection.
But even with OOM protection, a single Redis list can block all other users of Redis,
until Redis CPU consumption reaches the max allowed RAM size.
A default value of 0 means that this limit is disabled.
Only supported for list
Redis data_type
.
Either list or channel. If redis_type
is list, then we will set
RPUSH to key. If redis_type
is channel, then we will PUBLISH to key
.
TODO set required true
The Redis database number.
Only handle events without any of these tags. Note this check is additional to type and tags.
The hostname(s) of your Redis server(s). Ports may be specified on any hostname, which will override the global port config.
For example:
"127.0.0.1"
["127.0.0.1", "127.0.0.2"]
["127.0.0.1:6380", "127.0.0.1"]
The name of a Redis list or channel. Dynamic names are valid here, for example “logstash-%{type}”. TODO set required true
Name is used for logging in case there are multiple instances. TODO: delete
Password to authenticate with. There is no authentication by default.
The default port to connect on. Can be overridden on any hostname.
The name of the Redis queue (we’ll use RPUSH on this). Dynamic names are valid here, for example “logstash-%{type}” TODO: delete
Interval for reconnecting to failed Redis connections
Shuffle the host list during Logstash startup.
Only handle events with all of these tags. Note that if you specify a type, the event must also match that type. Optional.
Redis initial connection timeout in seconds.
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.
The number of workers to use for this output. Note that this setting may not be useful for all outputs.