使用Java客户端,我将插入一个这样的系列:
Serie serie1 =
new Serie.Builder(perfStat.pointCut).columns("time", "value").values(perfStat.start, perfStat.end - perfStat.start).build();
influxDB.write("pointcut_performance", TimeUnit.MICROSECONDS, serie1);
Grafana尝试运行此查询,但失败了......在Influxdb管理工具中也失败了:
select mean(value) from "com.xxx.databunker.salesforce.processing.jms.SalesForceLeadMessageListener.onMessage(Message)" where time > now() - 6h group by time(1s) order asc
您收到此错误:ERROR: Couldn't look up columns
。如果您取出“where”子句,它将运行:
select value from "com.springventuregroup.databunker.salesforce.processing.jms.SalesForceLeadMessageListener.onMessage(Message)"
我在文档中找不到这个。任何帮助非常感谢!
问题是:数据库中显然有可查询的数据,只要您的查询没有where close即可。为什么我会收到这个错误?
答案 0 :(得分:1)
我有完全相同的问题,在经过多次测试后我发现问题是我发送时间列的方式,
如果我有这些数据:
1326219450000 132850001 request http://yahoo.com 1
1326219449000 132840001 response http://tranco.com 1
然后只有当我添加这个部分“时间> now() - 1d”时才会抛出错误,我可以添加另一个where子句而不是那个,在除以1000后我不再发送错误的时间。
1412218778912 132830001 response http://google.com 1
1412218778720 132820001 request http://cranka.com 1
现在如果我留下两套:
1412133515000 132870001 request http://penca.com 1
1412133515000 132860001 request http://cranka.com 1
1326219450000 132850001 request http://yahoo.com 1
1326219449000 132840001 response http://tranco.com 1
我可以很好地进行查询,而grafana可以再次使用
select * from requests where time > now() - 1d
这是关于流入时间的评论,以秒为单位,而不是毫秒,https://github.com/influxdb/influxdb/issues/572
答案 1 :(得分:0)
您插入" pointcut_performance"并从" com.xxx.databunker.salesforce.processing.jms.SalesForceLeadMessageListener.onMessage(消息)中选择" ...
使用list series
查看可用的系列名称。