Telegraf: ZeroMQ Plugin

Created on 21 Feb 2016  Â·  15Comments  Â·  Source: influxdata/telegraf

An input/output plugin that reads/writes to a zeromq socket respectively.

I'd be happy to send a patch for this, if someone could please help me out in getting started.

feature request help wanted

All 15 comments

not sure what sort of help you're looking for, but the output plugin should be very similar to the mqtt and nsq outputs (see https://github.com/influxdata/telegraf/tree/master/plugins/outputs)

For input, would likewise be similar to the mqtt_consumer and nsq_consumer inputs (https://github.com/influxdata/telegraf/tree/master/plugins/inputs).

The input will be quite a bit more complicated so I would recommend starting with the output.

@sparrc Thanks. I'll get started on this. :)

great! :+1:

@indradhanush Did you have any luck on this one? I'm a bit interested in this as well.

@jamescarr Yeah. I wrote the output plugin last weekend and a test case, but I need to work on a docker container that will serve a zeromq server for the test case.

Cool let me know if you need a hand. I'm interesting in exposing similar functionality. :-D

@jamescarr I'll create a PR for the existing work and reference it here so you can also take a look at it.

AFAIK, there is no native Go library for ZeroMQ. There is a few Go bindings, but I believe they all use cgo and including a cgo package in Telegraf would not be ideal. See Dave Cheney's post on why cgo is not go. A big drawback for Telegraf is that it will complicate builds, including breaking cross-compiling. While cgo has it's place, I'm not sure it is in Telegraf — at least the main branch.

Nanomsg, the ZeroMQ alternative started by one of the original ZMQ authors, has a native go implementation mangos. However, this is not compatible with ZeroMQ.

There is a native Go implementation of ZeroMQ here https://github.com/zeromq/gomq although it looks young. I've written an input plugin for a ZeroMQ project i've worked on, but used cgo bindings, but I'd be happy to see if the native implementation works.

Any news on that particular feature ?

I would also be very interested in 0MQ support.

Is there any news on this? This feature would be useful.

Is there any update on this effort or does it need to be rebooted? It seems like there is still interest, but we haven't seen an update in 3 or so years. I could maybe find the time to lend a hand to the request if no one is actively working on this. This feature is a big want for me right now so I am happy to assist in any way possible.

@TannerW There's no one currently working on this right now so we welcome anything you would like to work on.

Please check out writing this as an external plugin that can be used with execd to run seamlessly with Telegraf. Any plugin could be used sooner by having it as an external plugin since it wouldn't have to go through the typical review process.

Feel free to respond with any questions you may have.

Thank you for the tips on getting started @sjwang90! I will start spinning something up this weekend and won’t hesitate with my questions. I will post an update to this thread ASAP.

Was this page helpful?
0 / 5 - 0 ratings