InfluxDB -- influxQL的模糊查询
文章目录
influxQL查询measurement中的指标时,可使用模糊查询。
查询measurement中字段包含特定字符串:
select * from cpu_used_percent where endpoint=~/192.168.0.1/ and time > '2021-09-11T00:00:00Z' order by time desc limit 10;查询measurement中字段以某个字符串起始:
select * from cpu_used_percent where endpoint=~/^datacenter/ and time > '2021-09-11T00:00:00Z' order by time desc limit 10;查询meaurement中字段以某个字符串结束:
select * from cpu_used_percent where endpoint=~/vm-$/ and time > '2021-09-11T00:00:00Z' order by time desc limit 10;//查询以Datacenter开头、vm-40结束的时序数据
select * from cpu_used_percent where endpoint=~/^Datacenter.*vm-40$/ order by time desc limit 10;
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论