创建 Chronograf HA 配置
要使用 etcd 集群作为共享数据存储创建 Chronograf 高可用性 (HA) 配置,请执行以下操作
- 安装并启动 etcd
- 为 Chronograf 设置负载均衡器
- 启动 Chronograf
是否想要将现有的 Chronograf 配置存储与 Chronograf HA 配置一起使用? 了解如何将您的 Chrongraf 配置迁移到共享数据存储。
架构
安装并启动 etcd
- 从 GitHub 下载最新的 etcd 版本。(有关特定于您的操作系统的详细安装说明,请参阅 安装和部署 etcd。)
- 提取
etcd
二进制文件并将其放置在您的系统 PATH 中。 - 启动 etcd。
启动 Chronograf
运行以下命令以使用 etcd
作为存储层启动 Chronograf。 语法取决于您是使用命令行标志还是 ETCD_ENDPOINTS
环境变量。
使用命令行标志定义 etcd 端点
# Syntax
chronograf --etcd-endpoints=<etcd-host>
# Examples
# Add a single etcd endpoint when starting Chronograf
chronograf --etcd-endpoints=localhost:2379
# Add multiple etcd endpoints when starting Chronograf
chronograf \
--etcd-endpoints=localhost:2379 \
--etcd-endpoints=192.168.1.61:2379 \
--etcd-endpoints=192.192.168.1.100:2379
使用 ETCD_ENDPOINTS 环境变量定义 etcd 端点
# Provide etcd endpoints in a comma-separated list
export ETCD_ENDPOINTS=localhost:2379,192.168.1.61:2379,192.192.168.1.100:2379
# Start Chronograf
chronograf
定义启用 TLS 的 etcd 端点
使用 --etcd-cert
标志指定 etcd PEM 编码的公共证书文件的路径,并使用 --etcd-key
标志指定与 etcd 证书关联的私钥的路径。
chronograf --etcd-endpoints=localhost:2379 \
--etcd-cert=path/to/etcd-certificate.pem \
--etcd-key=path/to/etcd-private-key.key
有关更多信息,请参阅 Chronograf etcd 配置选项。
此页是否对您有帮助?
感谢您的反馈!
支持和反馈
感谢您成为我们社区的一份子! 我们欢迎并鼓励您提供关于 Chronograf 和本文档的反馈和错误报告。 要查找支持,请使用以下资源