如何在OpenTSDB(时间序列数据库)中插入数据 [英] How to insert data in OpenTSDB (Time Series Database)

查看:1109
本文介绍了如何在OpenTSDB(时间序列数据库)中插入数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是OpenTSDB的新手。我以某种方式设法安装和配置OpenTSDB,但我不知道如何从客户端将数据放入OpenTSDB。你能帮助我吗?

解决方案

简单的答案是,那些把名称时间戳值[标签] 命令是通过TCP / IP向OpenTSDB添加数据的网络协议。所以从你的Java程序,你可以打开一个TCP套接字到TSD端口并开始编写命令来添加你的数据。

显然,这仍然给读者留下了很多细节和练习。

您没有在您的问题中指定您是如何收集您想要存储的时间序列数据。定期从应用程序中将数据推送到TSD有多复杂取决于你在那里做什么。如果您使用优秀的 Yammer / Coda Hale Metrics库来收集数据(并且使用Java,那么确实没有我不知道这样做)



度量标准包含一个记录界面,其中包含Graphite和Ganglia等其他统计信息库的多个实现。你可以很容易地实现一个OpenTSDB(实际上,已经有人 - 我试图找到github上的pull请求,但失败;我会在找到它的时候更新它)。

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?

解决方案

The short answer is that those "put name timestamp value [tags]" commands are the network protocol for adding data to OpenTSDB over TCP/IP. So from your Java program, you can open a TCP socket to the TSD port and start writing commands to add your data.

Obviously, that still leaves a lot of details an an excercise to the reader.

You didn't specify in your question how, or even if, you're collecting time series data that you want to store. How complicated it is to periodically push data into TSD from your application will depend on what you're doing there. If you're using the excellent Yammer/Coda Hale Metrics library to collect data (and in Java, there really isn't a slicker way to do it, that I know of)

Metrics includes a reporter interface with several implementations for other statistics repositories like Graphite and Ganglia. You can easily implement one for OpenTSDB (in fact, someone already has - I'm trying to find the pull request on github but failing; I'll update this when I find it).

这篇关于如何在OpenTSDB(时间序列数据库)中插入数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆