我有系列s1(例如主机1),分别有2列cA(例如使用的存储器)和cB(例如使用的另一种类型的存储器)。
如何获得添加s1.cA和s1.cB的结果的一组点。
我在这里查看了Influxdb文档http://influxdb.com/docs/v0.7/api/query_language.html 但我无法理解他们的例子。
提前致谢。
答案 0 :(得分:2)
您应该可以运行select cA + cB from s1
,下面是对某些示例数据运行查询的屏幕截图:
答案 1 :(得分:0)
由于您尝试从具有不同时间戳的不同来源添加数据,因此您可以按照以下步骤进行操作 -
Source A
1. Set the time series name
2. Set the coulmns (2 in your case)
3. Set the point of Source A, set 0 for source B
Source B
1. Set the time series name
2. Set the coulmns (2 in your case)
3. Set the point of Source B, set 0 for source A
带有数据的JSON请求将如下所示 -
{"name":"s1","columns":["cA","cB"],"points":[[0,1212],[123123123,0]]}