rabbitmq

 

Synopsis

This plugin supports the following configuration options:

Required configuration options:

rabbitmq {
    host => ...
    subscription_retry_interval_seconds => ...
}

Available configuration options:

Setting Input type Required Default value

ack

boolean

No

true

add_field

hash

No

{}

arguments

array

No

{}

auto_delete

boolean

No

false

automatic_recovery

boolean

No

true

codec

codec

No

"json"

connect_retry_interval

number

No

1

connection_timeout

number

No

durable

boolean

No

false

exchange

string

No

exclusive

boolean

No

false

heartbeat

number

No

host

string

Yes

key

string

No

"logstash"

passive

boolean

No

false

password

password

No

"guest"

port

number

No

5672

prefetch_count

number

No

256

queue

string

No

""

ssl

boolean

No

false

subscription_retry_interval_seconds

number

Yes

5

tags

array

No

threads

number

No

1

type

string

No

user

string

No

"guest"

verify_ssl

boolean

No

false

vhost

string

No

"/"

Details

 

ack

  • Value type is boolean
  • Default value is true

Enable message acknowledgement

add_field

  • Value type is hash
  • Default value is {}

Add a field to an event

arguments

  • Value type is array
  • Default value is {}

Extra queue arguments as an array. To make a RabbitMQ queue mirrored, use: {"x-ha-policy" => "all"}

auto_delete

  • Value type is boolean
  • Default value is false

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.

automatic_recovery

  • Value type is boolean
  • Default value is true

Set this to automatically recover from a broken connection. You almost certainly don’t want to override this!!!

codec

  • Value type is codec
  • Default value is "json"

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.

connect_retry_interval

  • Value type is number
  • Default value is 1

Time in seconds to wait before retrying a connection

connection_timeout

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

The default connection timeout in milliseconds. If not specified the timeout is infinite.

debug (DEPRECATED)

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

Enable or disable logging

durable

  • Value type is boolean
  • Default value is false

Is this queue durable? (aka; Should it survive a broker restart?)

exchange

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

The name of the exchange to bind the queue to.

exclusive

  • Value type is boolean
  • Default value is false

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

heartbeat

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

Heartbeat delay in seconds. If unspecified no heartbeats will be sent

host

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

RabbitMQ server address

key

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

The routing key to use when binding a queue to the exchange. This is only relevant for direct or topic exchanges.

  • Routing keys are ignored on fanout exchanges.
  • Wildcards are not valid on direct exchanges.

passive

  • Value type is boolean
  • Default value is false

Passive queue creation? Useful for checking queue existance without modifying server state

password

  • Value type is password
  • Default value is "guest"

RabbitMQ password

port

  • Value type is number
  • Default value is 5672

RabbitMQ port to connect on

prefetch_count

  • Value type is number
  • Default value is 256

Prefetch count. Number of messages to prefetch

queue

  • Value type is string
  • Default value is ""

The default codec for this plugin is JSON. You can override this to suit your particular needs however. The name of the queue Logstash will consume events from.

ssl

  • Value type is boolean
  • Default value is false

Enable or disable SSL

subscription_retry_interval_seconds

  • This is a required setting.
  • Value type is number
  • Default value is 5

Amount of time in seconds to wait after a failed subscription request before retrying. Subscribes can fail if the server goes away and then comes back

tags

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

threads

  • Value type is number
  • Default value is 1

type

  • 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

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

RabbitMQ username

verify_ssl

  • Value type is boolean
  • Default value is false

Validate SSL certificate

vhost

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

The vhost to use. If you don’t know what this is, leave the default.