influxdb - 无法通过 influx CLI 工具连接到 influxd
问题描述
我在我的 CentOS 8.2 服务器中安装了 influx。
[root@dele opt]# influxd version
InfluxDB 2.0.2 (git: 84496e507a) build_date: 2020-11-19T03:59:35Z
[root@dele opt]# influx version
Influx CLI 2.0.2 (git: 84496e507a) build_date: 2020-11-19T03:59:35Z
我开始涌入:
influxd &
在那里听 8086。
tcp6 0 0 :::8086 :::* LISTEN
但我无法连接到 influxd:
[root@fastnetmon opt]# influx -host localhost -p 8086
Error: unknown shorthand flag: 'o' in -ost
See 'influx -h' for help
[root@fastnetmon opt]# influx --host localhost --p 8086
Error: unknown flag: --host
See 'influx -h' for help
也不是通过命令:
[root@dele opt]# /usr/bin/influx -precision rfc3339
Error: unknown shorthand flag: 'p' in -precision
解决方案
经过一段时间的努力,我验证了2.0版本不支持这些命令。
如果是 2.0 版本,您可以在“数据资源管理器部分”的 influxdb 中执行查询。在 2.0 版本中,您拥有类似于数据库的存储桶,您可以从 cli 创建它们,如下例所示:
influx bucket create -n <bucketname> --org-id <Organisation ID> -r 10h -t <your token>
令牌是从 influxdb 的主页生成的,您可以从该主页访问 InfluxDB 2.0 实例的每个部分。
您可以从此处访问您的组织、仪表板和文档。
推荐阅读
- javascript - 样式...的组件是动态创建的。您可能会看到此警告,因为您在另一个组件中调用了 styled
- powershell - 文件大小加倍,同时替换变量中的值并使用不同的名称输出
- html - CSS Gradient - 太多的颜色中断
- javascript - React - 如何在不在子组件中添加额外代码的情况下从一个组件调用方法到另一个组件
- oracle-apex - 交互式网格 - 交互式网格的数据库约束错误处理
- map-matching - 使用不同的方式操作地图?
- r - Rstudio:为什么适合统计的 M2 适用于四个分级响应模型中的单个案例?
- android - 应用程序关闭时的定期任务和通知
- iot - 累积数据类型处理
- javascript - 在 JavaScript 画布 API 中设置允许的绘图区域