Influx远程更新
复制远程和复制流只能为 InfluxDB OSS 配置。
命令 influx remote update 更新用于复制数据的现有 InfluxDB 远程连接。
用法
influx remote update [command options] [arguments...]
标志
| 标志 | 描述 | 输入类型 | 映射到 ? | |
|---|---|---|---|---|
-i | --id | 要更新的远程连接ID | string | |
-n | --name | 远程连接的新名称 | string | |
-d | --description | 新的远程连接描述 | 字符串 | |
--remote-url | 新的远程 InfluxDB URL | 字符串 | ||
--remote-api-token | 新的远程 InfluxDB API 令牌 | string | ||
--remote-org-id | 新的远程组织ID | 字符串 | ||
--allow-insecure-tls | 允许不安全的TLS连接 | |||
--host | InfluxDB HTTP 地址 (默认 http://localhost:8086) | 字符串 | INFLUX_HOST | |
--skip-verify | 跳过TLS证书验证 | INFLUX_SKIP_VERIFY | ||
--configs-path | 指向 influx CLI 配置的路径(默认 ~/.influxdbv2/configs) | string | INFLUX_CONFIGS_PATH | |
-c | --active-config | 用于命令的CLI配置 | string | |
--http-debug | 检查与InfluxDB服务器的通信 | string | ||
--json | 以 JSON 格式输出数据(默认 false) | INFLUX_OUTPUT_JSON | ||
--hide-headers | 隐藏表头(默认 false) | INFLUX_HIDE_HEADERS | ||
-t | --token | InfluxDB API令牌 | 字符串 | INFLUX_TOKEN |
示例
身份验证凭据
下面的示例假设您的 InfluxDB 主机、组织 和 令牌 是通过 活动 influx CLI 配置 或环境变量 (INFLUX_HOST、INFLUX_ORG 和 INFLUX_TOKEN) 提供的。如果您没有设置 CLI 配置或环境变量,请在每个命令中使用以下标志包含这些必需的凭据:
--host: InfluxDB 主机-o, --org或--org-id: InfluxDB 组织名称或 ID-t, --token: InfluxDB API 令牌
更新远程
- 使用
influx remote list获取您想要更新的远程的 ID。$ influx remote list ID 名称 组织 ID 0ooxX0xxXo0x myremote [...] - 使用以下命令来更新远程:
influx remote update \ --id 0ooxX0xxXo0x --name new-example-name --description 新示例描述 --remote-url http://new-example-url.com --remote-api-token myN3wS3crE7t0k3n== --remote-org-id new-example-org-id