Zeromq output plugin v3.1.1
editZeromq output plugin v3.1.1
edit- Plugin version: v3.1.1
- Released on: 2017-06-23
- Changelog
For other versions, see the overview list.
To learn more about Logstash, see the Logstash Reference.
Getting help
editFor 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.
Description
editWrite 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 Options
editThis plugin supports the following configuration options plus the Common options described later.
Setting | Input type | Required |
---|---|---|
No |
||
string, one of |
No |
|
No |
||
No |
||
string, one of |
Yes |
Also see Common options for a list of options supported by all output plugins.
address
edit- 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.
mode
edit-
Value can be any of:
server
,client
-
Default value is
"client"
Server mode binds/listens. Client mode connects.
sockopt
edit- 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" }
topic
edit- 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.
topology
edit- 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 options
editThese configuration options are supported by all output plugins:
codec
edit- Value type is codec
-
Default value is
"plain"
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.
enable_metric
edit- 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.
id
edit- 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" } }