How to insert data in OpenTSDB (Time Series Database)

user1099871 picture user1099871 · Dec 15, 2011 · Viewed 12.9k times · Source

I'm new to OpenTSDB. I somehow managed to install and configure OpenTSDB, but I don't know how to put data into OpenTSDB from client. Can anyone of you help me?

Answer

Grooveek picture Grooveek · Dec 15, 2011

Have you read the getting started guide

You have several options. Once started, and metrics created via ./tsdb mkmetric mymetric.data_1 mymetric.data_2 , you can batch import files written in the form

metric_name timestamp value tags e.g.

mymetric.data_1 1295643636 48 a=foo

then you can ./tsdb import file

An other way is to "telnet" commands to the server in the same form as above, but with the put keyword, like echo "put mymetric.data_1 1295643636 48 a=foo" | nc -w 15 tsdHost tsdPort (linux way :-) )