Howto run netstat.py

39 views
Skip to first unread message

Jay Nair

unread,
Oct 5, 2011, 1:12:34 AM10/5/11
to OpenTSDB
Hi,

New to this and so a newbie question. I am able to run 'startstop' and
it says the program has started. I have set the TSD_HOST and
TCOLLECTOR_PATH in the script.

When I run netstat.py by itself, it prints the data to stdout. How do
I make this data reach hbase. What is the correct way to run
netstat.py? Is tcollector supposed to run all the collectors in the
'collectors dir?

Thanks

tsuna

unread,
Oct 5, 2011, 4:56:34 AM10/5/11
to Jay Nair, OpenTSDB

Yes, tcollector will automatically run any executable it finds in
subdirectories of `collectors' and send data to a TSD. If that
doesn't work, you'd have to look at collector's log to find out why.

--
Benoit "tsuna" Sigoure
Software Engineer @ www.StumbleUpon.com

tsuna

unread,
Oct 6, 2011, 7:34:44 PM10/6/11
to Jay Nair, OpenTSDB
Re-adding the mailing list in Cc, I assume you mistakenly removed it.

On Thu, Oct 6, 2011 at 4:12 PM, Jay Nair <jayakrish...@gmail.com> wrote:
> After I executed the mkmetric for all the metrics created by
> netstat.py, I am seeing the values in open tsdb.

Great.

> This question was asked a few times, but I could not find a concrete
> example to follow. I need to write a Java Client which sends data. I
> made an HttpURLConnection to host:4242, set the RequestMethod as PUT
> and then wrote the string value as 'java.message <unixtime> <value>
> <string>' and I  don't see the values in open tsdb.
>
> Are there any examples of a Java based HTTP put which I can copy and
> modify?

At this time you cannot send new data points over HTTP. You have to
open a normal TCP socket and then write "put java.message <unixtime>
<value> <string>\n" to the socket.

Jay Nair

unread,
Oct 10, 2011, 12:16:28 AM10/10/11
to OpenTSDB
Thanks Benoit. The TCP put works and I see data getting in.

On Oct 6, 4:34 pm, tsuna <tsuna...@gmail.com> wrote:
> Re-adding the mailing list in Cc, I assume you mistakenly removed it.
>
Reply all
Reply to author
Forward
0 new messages