美文网首页
influxdb的常用操作

influxdb的常用操作

作者: 潘雪雯 | 来源:发表于2022-02-15 19:38 被阅读0次

以非默认端口登陆inflxudb,并且能用正常的时间展示数据

influx -host localhost -port xxx -precision rfc3339

展示数据的最开始的10条:

select "ziduan" from table limit 10;

查看最近10s的数据(时间可以自定义范围)

select "ziduan" from table where tag='tag' and time > now() - 10s;

时间可以自定义范围
还可以按某个条件进行group by

select "ziduan" from table where tag='tag' and time > now() - 10s group by tag1

展示所有的tag

show tag keys from table;

select "ziduan" from table where tag='tag' and time > now() - 0.2h;
问题: ERR: error parsing query: found h, expected ; at line 1, char 76
原因: 不能用0.2h的形式

官方网站

相关文章

网友评论

      本文标题:influxdb的常用操作

      本文链接:https://www.haomeiwen.com/subject/jimdlrtx.html