Zeromq output plugin v3.1.2edit

  • Plugin version: v3.1.2
  • Released on: 2017-11-13
  • Changelog

For other versions, see the overview list.

To learn more about Logstash, see the Logstash Reference.

Getting Helpedit

For questions about the plugin, open a topic in the Discuss forums. For bugs or feature requests, open an issue in Github. For the list of Elastic supported plugins, please consult the Elastic Support Matrix.

Descriptionedit

Write events to a 0MQ PUB socket.

You need to have the 0mq 2.1.x library installed to be able to use this output plugin.

The default settings will create a publisher connecting to a subscriber bound to tcp://127.0.0.1:2120

Zeromq Output Configuration Optionsedit

This plugin supports the following configuration options plus the Common Options described later.

Setting Input type Required

address

array

No

mode

string, one of ["server", "client"]

No

sockopt

hash

No

topic

string

No

topology

string, one of ["pushpull", "pubsub", "pair"]

Yes

Also see Common Options for a list of options supported by all output plugins.

 

addressedit

  • Value type is array
  • Default value is ["tcp://127.0.0.1:2120"]

This will be a performance bottleneck. Someone needs to upgrade this to concurrency :shared and make sure there is no breakage 0mq socket address to connect or bind. Please note that inproc:// will not work with logstashi. For each we use a context per thread. By default, inputs bind/listen and outputs connect.

modeedit

  • Value can be any of: server, client
  • Default value is "client"

Server mode binds/listens. Client mode connects.

sockoptedit

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

This exposes zmq_setsockopt for advanced tuning. See http://api.zeromq.org/2-1:zmq-setsockopt for details.

This is where you would set values like:

  • ZMQ::HWM - high water mark
  • ZMQ::IDENTITY - named queues
  • ZMQ::SWAP_SIZE - space for disk overflow

Example:

    sockopt => {
       "ZMQ::HWM" => 50
       "ZMQ::IDENTITY"  => "my_named_queue"
    }

topicedit

  • Value type is string
  • Default value is ""

This is used for the pubsub topology only. On inputs, this allows you to filter messages by topic. On outputs, this allows you to tag a message for routing. NOTE: ZeroMQ does subscriber-side filtering NOTE: Topic is evaluated with event.sprintf so macros are valid here.

topologyedit

  • This is a required setting.
  • Value can be any of: pushpull, pubsub, pair
  • There is no default value for this setting.

The default logstash topologies work as follows:

  • pushpull - inputs are pull, outputs are push
  • pubsub - inputs are subscribers, outputs are publishers
  • pair - inputs are clients, outputs are servers

If the predefined topology flows don’t work for you, you can change the mode setting

Common Optionsedit

The following configuration options are supported by all output plugins:

Setting Input type Required

enable_metric

boolean

No

id

string

No

enable_metricedit

  • Value type is boolean
  • Default value is true

Disable or enable metric logging for this specific plugin instance. By default we record all the metrics we can, but you can disable metrics collection for a specific plugin.

idedit

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

Add a unique ID to the plugin configuration. If no ID is specified, Logstash will generate one. It is strongly recommended to set this ID in your configuration. This is particularly useful when you have two or more plugins of the same type. For example, if you have 2 zeromq outputs. Adding a named ID in this case will help in monitoring Logstash when using the monitoring APIs.

output {
  zeromq {
    id => "my_plugin_id"
  }
}