telegraf
telegraf copied to clipboard
StatsD output
Following up with the corollary to https://github.com/influxdb/telegraf/issues/39, a StatsD output could be useful for sending metrics produced by Telegraf to a StatsD consumer.
:+1:
:+1:
Does anyone have a suggestion on how this would work? How could a Telegraf metric be converted into a Gauge/Counter/Timer/Set?
closing this as won't implement, there isn't a clear mapping to statsd metrics from telegraf, and there is already a PR up for graphite output #494
Pardon my naivete, but the fact that a datadog output plugin exists indicates to me that the mapping to statsd (or datadogs variant of the statsd protocol) should be possible. What am I missing?
Also, it looks like support for Counter
and Gauge
types was added in telegraf.ValueType. Maybe we could just support those two?
After some experimenting, it looks like reusing the socket_writer
(udp) with a custom serializer
seems to suffice. So it seems like we don't necessarily need a new output plugin, but a serializer that can by used by a socket_writer
.
@sparrc , would something like this be acceptable? Is this even on the right track?
@amoghe Did you end up building something for this? I've been looking for a similar solution. I like telegraf's filtering capabilities, so wanted to use it to receive statsd locally and forward the filtered metrics on to another statsd-compatible agent (or multiple agents for that matter).
@stevenscg not yet. I'll try to put up something this week.
@amoghe Sounds good. I won't be much help with the coding, but happy to test it out.
Did anything more happen with this? I too am interested in the results. I have a statsd-compatible upstream service and would like to aggregate custom Telegraf stats there, without having to jury-rig something with statsd itself.
I can reopen this issue, however I have some concerns about how well this will work in practice. Telegraf doesn't currently have type information for the vast majority of metrics, the current type info does little more than support prometheus input to prometheus output roundtripping. Unless we add richer type information it will be difficult to properly set the statsd types.
I am working on sending telegraf metrics to dogstatsD agent, what plugin can I use for this
Also interested in this use case as I am trying to "front" a plain protocol speaking service (collectd) with Telegraf accepting dogstatsd as input and would like to selectively forward some metrics stripped of tags to collectd while sending other metrics ingested elsewhere