Closed DonTermi closed 4 years ago
Not sure, is there any error message or something?
You can try capturing the packets with nc
(by running in server mode), but I don't see anything obvious.
It was working after adding
time.Sleep(time.Millisecond*50)
(after start := ...)
Probably you have server starting up concurrently? In any case client reconnects automatically.
Hello,
with your statsd client I can't send metrics to any statsd server. In my case it's telegraf on localhost:2002. I'm using go 1.13.
I tested it from cmd line via
$ echo "foobar.test,region=eu:$(shuf -i 10-999 -n 1)|ms" | nc -w 1 -u localhost 2002
This works.
`> select * from "foobar.test" name: foobar.test time count host lower mean metric_type region stddev sum upper
2019-09-23T13:04:10Z 1 jenkinssol 733 733 timing eu 0 733 733`
What am I doing wrong?
My code
`package main
import ( "github.com/smira/go-statsd" )
func main() { client := statsd.NewClient("localhost:2002", statsd.MaxPacketSize(1400), statsd.MetricPrefix("foobar."))
}`