如何查询所有InfluxDB _internal数据库度量值?

时间:2019-06-11 15:54:25

标签: influxdb influxql

我无法使用Influxql从_InfluxDB的_internal数据库查询以下测量值:

database
write
shard

查看以下命令的结果:

> show databases
name: databases
name
----
_internal

>use _internal

> show measurements
name: measurements
name
----
cq
database
httpd
queryExecutor
runtime
shard
subscriber
tsm1_cache
tsm1_engine
tsm1_filestore
tsm1_wal
write

> select * fron database limit 1;
ERR: error parsing query: found fron, expected FROM at line 1, char 10
> select * from write limit 1;
ERR: error parsing query: found WRITE, expected identifier at line 1, char 15
> select * from shard limit 1;
ERR: error parsing query: found SHARD, expected identifier at line 1, char 15

但是我可以成功查询其他一些测量结果

> select * from queryExecutor limit 1;
name: queryExecutor
time                hostname              queriesActive queriesExecuted queriesFinished queryDurationNs recoveredPanics
----                --------              ------------- --------------- --------------- --------------- ---------------
1559923260000000000 localhost.localdomain 0             0               0               0               0

如何在所有测量可用的情况下从_InfluxDB的_internal数据库中查询/提取数据?

1 个答案:

答案 0 :(得分:0)

嗯,,,,为时已晚...但是我找到了一种方法 在某些情况下,如果查询的一个标识符是InfluxQL关键字,则会出现扩展的标识符错误。要成功查询也是一个关键字的标识符,请将标识符与大引号相关联。

select * from "database"