statsd icon indicating copy to clipboard operation
statsd copied to clipboard

Statsd complains constantly when emitting to Sysdig's StatsD teleport

Open jdyer09 opened this issue 7 years ago • 1 comments

This is essentially the opposite of #25, but the way Sysdig handles StatsD is to listen for outgoing packets in the kernel, rather than capture them. This is a relatively common use case for containerized applications (i.e. Docker & Kubernetes). By doing it this way, there's no need to instrument a StatsD listener in the container or deal with networking. More info here: https://sysdig.com/blog/how-to-collect-statsd-metrics-in-containers/

From looking into it, quipo/statsd use net.Conn, which will log a failure when emitting to no one in particular: https://github.com/quipo/statsd/blob/master/client.go#L190 [BufferedStatsdClient] 2017/03/28 21:44:41 write udp 127.0.0.1:57858->127.0.0.1:8125: write: connection refused

Using a net.PacketConn and WriteTo() does not produce an error in the same conditions. I was considering a pull request for a sysdig client, but the scope is pretty large for an essentially parallel code path. I was wondering about just replacing the existing net.conn with a net.PacketConn?

jdyer09 avatar Mar 28 '17 22:03 jdyer09

Try a multicast address?

ReneKroon avatar Nov 08 '17 21:11 ReneKroon