1

我无法使用 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 * from 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 数据库中查询/提取所有可用测量的数据?

4

1 回答 1

1

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

select * from "database"
于 2019-11-22T07:36:22.003 回答