A (sort of - it's not directly to do with C#) related question in SO is: How to insert data in OpenTSDB (Time Series Database); as mentioned there, the basic shell command which easily works (in linux) is as follows:
echo "put mymetric.data_1 1295643636 48 a=foo" | nc -w 15 tsdHost tsdPort
My question is has anyone written a collector in C# for OpenTSDB? The issue I am facing is that although I can open a Socket to the tsd instance/port and I write the following to its stream, nothing seems to happen.
put mymetric.data_1 1295643636 48 a=foo
I am creating an InterNetwork, Stream based TCP Socket, and tried sending the above string as ASCII, UTF-8,-16 and -32 encoded bytes, all in vain.
Any pointers in what kind of Socket and what kind of encoded bytes I need to use will really help. The Java
code sample for the same thing I am trying to achieve is:
Socket sock = new Socket("tsd.server.com", 4242);
String point = "put my.metric 1314137008 60 host=someplace.net foo=1\n";
sock.getOutputStream().write(point.getBytes());
sock.close();