influxdata / telegraf

Agent for collecting, processing, aggregating, and writing metrics, logs, and other arbitrary data.
https://influxdata.com/telegraf
MIT License
14.15k stars 5.52k forks source link

StatsD output #348

Open gunnaraasen opened 8 years ago

gunnaraasen commented 8 years ago

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.

anarcher commented 8 years ago

:+1:

pcheliniy commented 8 years ago

:+1:

sparrc commented 8 years ago

Does anyone have a suggestion on how this would work? How could a Telegraf metric be converted into a Gauge/Counter/Timer/Set?

sparrc commented 8 years ago

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

amoghe commented 6 years ago

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?

amoghe commented 6 years ago

Also, it looks like support for Counter and Gauge types was added in telegraf.ValueType. Maybe we could just support those two?

amoghe commented 6 years ago

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?

stevenscg commented 6 years ago

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

amoghe commented 6 years ago

@stevenscg not yet. I'll try to put up something this week.

stevenscg commented 6 years ago

@amoghe Sounds good. I won't be much help with the coding, but happy to test it out.

OldhamMade commented 4 years ago

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.

danielnelson commented 4 years ago

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.

imalearner96 commented 2 years ago

I am working on sending telegraf metrics to dogstatsD agent, what plugin can I use for this

elee commented 1 year ago

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