Pull events from a RabbitMQ exchange.
The default settings will create an entirely transient queue and listen for all messages by default. If you need durability or any other advanced settings, please set the appropriate options
This has been tested with Bunny 0.9.x, which supports RabbitMQ 2.x and 3.x. You can find links to both here:
input {
rabbitmq {
ack => ... # boolean (optional), default: true
add_field => ... # hash (optional), default: {}
arguments => ... # array (optional), default: {}
auto_delete => ... # boolean (optional), default: false
codec => ... # codec (optional), default: "plain"
durable => ... # boolean (optional), default: false
exchange => ... # string (optional)
exclusive => ... # boolean (optional), default: false
host => ... # string (required)
key => ... # string (optional), default: "logstash"
passive => ... # boolean (optional), default: false
password => ... # password (optional), default: "guest"
port => ... # number (optional), default: 5672
prefetch_count => ... # number (optional), default: 256
queue => ... # string (optional), default: ""
ssl => ... # boolean (optional), default: false
tags => ... # array (optional)
threads => ... # number (optional), default: 1
type => ... # string (optional)
user => ... # string (optional), default: "guest"
verify_ssl => ... # boolean (optional), default: false
vhost => ... # string (optional), default: "/"
}
}
Enable message acknowledgement
Add a field to an event
Extra queue arguments as an array. To make a RabbitMQ queue mirrored, use: {“x-ha-policy” => “all”}
Should the queue be deleted on the broker when the last consumer disconnects? Set this option to ‘false’ if you want the queue to remain on the broker, queueing up messages until a consumer comes along to consume them.
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.
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.
Enable or disable logging
Is this queue durable? (aka; Should it survive a broker restart?)
(Optional) Exchange binding
Optional.
The name of the exchange to bind the queue to.
Is the queue exclusive? Exclusive queues can only be used by the connection that declared them and will be deleted when it is closed (e.g. due to a Logstash restart).
The format of input data (plain, json, json_event)
Connection
RabbitMQ server address
Optional.
The routing key to use when binding a queue to the exchange. This is only relevant for direct or topic exchanges.
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.
Passive queue creation? Useful for checking queue existance without modifying server state
RabbitMQ password
RabbitMQ port to connect on
Prefetch count. Number of messages to prefetch
Queue & Consumer
The name of the queue Logstash will consume events from.
Enable or disable SSL
Add any number of arbitrary tags to your event.
This can help with processing later.
Set this to the number of threads you want this input to spawn. This is the same as declaring the input multiple times
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 the web interface.
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.
RabbitMQ username
Validate SSL certificate
The vhost to use. If you don’t know what this is, leave the default.