alexcesaro / statsd

An efficient Statsd Go client.
MIT License
301 stars 79 forks source link

Gauge metrics are not pushed to the statsd server #36

Open chakas opened 5 years ago

chakas commented 5 years ago

Wrote a simple code to push disk usage metrics to statsd using below code. client.Gauge("test.snap.stats.filesystem.c_drive.free", 100)

but unable to see data from grafana. Tested the same using bash script echo "eenadu.snap.stats.filesystem.used:3|g" | nc -w 1 -u 127.0.0.1 8125 and able to see data

So again did a force flush still not able to see data

joeycumines commented 4 years ago

Years late I know, but this was likely due to broken TCP support, which I've addressed in my fork. From memory, statsd expects a trailing newline for all stats read from TCP connections (since it's a stream), but doesn't like trailing newlines at the end of UDP packets.

https://github.com/cactus/go-statsd-client/issues/17 for reference