我有一个系列,里面有一些标签
> show tag keys on telegraf from mqtt_consumer
name: mqtt_consumer
tagKey
------
host
house_tag
sensorId
topic我使用的是一个正常的查询,它可以在influx命令行中正常工作
select time,value,sensorId,house_tag from mqtt_consumer where time>now()-10m and house_tag='houseG1'它返回预期的结果。
现在,当我尝试使用-execute命令使用Influx CLI运行相同的查询时,它什么也不返回。
这是我正在使用的CLI命令。我不会抛出错误,它只是什么都不返回。我写的查询是不是写错了?我尝试过在house_tag标记中使用双引号,但不起作用。当我删除"house_tag“部分时,查询就会运行(当然,我想看到的不仅仅是house_tags )
sudo influx -username user -password "password" -database 'database' -host 'localhost' -execute 'select time,value,sensorId,house_tag from mqtt_consumer where time>now()-1d and house_tag='houseG1'' -format 'csv'发布于 2018-11-09 04:44:28
查询没有运行的原因是没有在-execute语句中组合使用双引号"和单引号'。
尝试运行以下查询:
sudo influx -username user -password "password" -database 'database' -host 'localhost' -execute "select time,value,sensorId,house_tag from mqtt_consumer where time>now()-1d and house_tag='houseG1'" -format csvhttps://stackoverflow.com/questions/52149218
复制相似问题