influx2.7的配置


自定义配置步骤:

  1. 网页设置API TOKEN
  2. influx.exe使用API TOKEN设置连接
  3. 导出配置
  4. 修改相关路径,保存配置
  5. 重新以新配置启动influxd.exe

1初步设置使用默认配置启动的influxd

1.打开网址:http://localhost:8086
2.点击GET STARTED,然后输入一些基本信息,点击Continue
3.上面那个token需要记录下来,等会用influx.exe去连的时候要用到。

2使用influx(cli)连接默认配置的influxd

设置influx的连接:

.\influx config create --config-name onboarding `
  --host-url "http://localhost:8086" `
  --org "4d4cac9ac2131792" `
  --token "l_DY2pOMa7IbZEBv2eLAtRTe7Upw3B2xi19s7tgJQtvwe0o1UGanuKz2JHVWYMwyZ8hUVp5ynCRhfsYpMqugDw==" `
  --active

即设置了名称为awise的连接,并把这个连接设置为活跃(默认)状态

3导出数据库服务端的运行配置

.\influx server-config > config.json

可以看到在目录下生成了一个config.json的文件

4修改相关路径,保存配置

修改为目标路径

{
    "assets-path": "",
    "bolt-path": ".\\.influxdbv2\\influxd.bolt",
    "e2e-testing": false,
    "engine-path": ".\\.influxdbv2\\engine",
    "feature-flags": null,
    "flux-log-enabled": false,
    "hardening-enabled": false,
    "http-bind-address": ":8086",
    "http-idle-timeout": 180000000000,
    "http-read-header-timeout": 10000000000,
    "http-read-timeout": 0,
    "http-write-timeout": 0,
    "influxql-max-select-buckets": 0,
    "influxql-max-select-point": 0,
    "influxql-max-select-series": 0,
    "instance-id": "",
    "log-level": "info",
    "metrics-disabled": false,
    "nats-max-payload-bytes": 0,
    "nats-port": 0,
    "no-tasks": false,
    "pprof-disabled": false,
    "query-concurrency": 1024,
    "query-initial-memory-bytes": 0,
    "query-max-memory-bytes": 0,
    "query-memory-bytes": 0,
    "query-queue-size": 1024,
    "reporting-disabled": false,
    "secret-store": "bolt",
    "session-length": 60,
    "session-renew-disabled": false,
    "sqlite-path": ".\\.influxdbv2\\influxd.sqlite",
    "storage-cache-max-memory-size": 1073741824,
    "storage-cache-snapshot-memory-size": 26214400,
    "storage-cache-snapshot-write-cold-duration": "10m0s",
    "storage-compact-full-write-cold-duration": "4h0m0s",
    "storage-compact-throughput-burst": 50331648,
    "storage-max-concurrent-compactions": 0,
    "storage-max-index-log-file-size": 1048576,
    "storage-no-validate-field-size": false,
    "storage-retention-check-interval": "30m0s",
    "storage-series-file-max-concurrent-snapshot-compactions": 0,
    "storage-series-id-set-cache-size": 0,
    "storage-shard-precreator-advance-period": "30m0s",
    "storage-shard-precreator-check-interval": "10m0s",
    "storage-tsm-use-madv-willneed": false,
    "storage-validate-keys": false,
    "storage-wal-fsync-delay": "0s",
    "storage-wal-max-concurrent-writes": 0,
    "storage-wal-max-write-delay": 600000000000,
    "storage-write-timeout": 10000000000,
    "store": "disk",
    "strong-passwords": false,
    "template-file-urls-disabled": false,
    "testing-always-allow-setup": false,
    "tls-cert": "",
    "tls-key": "",
    "tls-min-version": "1.2",
    "tls-strict-ciphers": false,
    "tracing-type": "",
    "ui-disabled": false,
    "vault-addr": "",
    "vault-cacert": "",
    "vault-capath": "",
    "vault-client-cert": "",
    "vault-client-key": "",
    "vault-client-timeout": 0,
    "vault-max-retries": 0,
    "vault-skip-verify": false,
    "vault-tls-server-name": "",
    "vault-token": ""
}

5重新以新配置启动influxd.exe

直接重启influxd.exe即可

./influxd.exe

声明:一代明君的小屋|版权所有,违者必究|如未注明,均为原创|本网站采用BY-NC-SA协议进行授权

转载:转载请注明原文链接 - influx2.7的配置


欢迎来到我的小屋