
networkcloudmanager/influxdb-relay本镜像为appcelerator/influxdb-relay的冻结版本,基于原始InfluxDB中继服务构建,提供固定版本的稳定运行环境。通过冻结版本,确保服务行为一致性,避免因上游版本更新导致的兼容性问题,适用于对版本稳定性有严格要求的生产环境。
通过docker run命令快速启动,需挂载配置文件指定转发规则:
bashdocker run -d \ --name influxdb-relay \ --restart always \ -p 9096:9096 \ # 映射中继服务监听端口 -v /host/path/to/relay.conf:/etc/influxdb-relay/relay.conf \ # 挂载本地配置文件 appcelerator/influxdb-relay:frozen
中继服务通过relay.conf配置文件定义转发规则,采用TOML格式,示例如下:
toml# HTTP中继配置 [[http]] name = "primary-relay" # 中继名称(自定义标识) bind-addr = "0.0.0.0:9096" # 服务监听地址与端口 database = "metrics" # 目标数据库名称(可选,优先级低于写入请求中的数据库) retention-policy = "autogen" # 目标保留策略(可选,优先级低于写入请求中的策略) # 后端目标InfluxDB实例配置(可配置多个) [[http.targets]] name = "influxdb-node-1" # 目标实例名称 url = "[***]" # 目标实例HTTP API地址 timeout = "10s" # 超时时间(默认5s) skip-tls-verification = false # 是否跳过TLS证书验证(默认false) [[http.targets]] name = "influxdb-node-2" url = "[***]"
通过docker-compose.yml整合中继服务与InfluxDB集群,示例配置:
yamlversion: '3.8' services: influxdb-relay: image: appcelerator/influxdb-relay:frozen ports: - "9096:9096" volumes: - ./relay.conf:/etc/influxdb-relay/relay.conf depends_on: - influxdb-1 - influxdb-2 restart: unless-stopped influxdb-1: image: influxdb:1.8 volumes: - influxdb-data-1:/var/lib/influxdb environment: - INFLUXDB_DB=metrics restart: unless-stopped influxdb-2: image: influxdb:1.8 volumes: - influxdb-data-2:/var/lib/influxdb environment: - INFLUXDB_DB=metrics restart: unless-stopped volumes: influxdb-data-1: influxdb-data-2:
| 配置项路径 | 说明 | 默认值 |
|---|---|---|
http.bind-addr | 中继服务监听地址与端口(格式:IP:PORT) | 0.0.0.0:9096 |
http.database | 默认目标数据库名称(优先级低于写入请求中的db参数) | - |
http.retention-policy | 默认保留策略(优先级低于写入请求中的rp参数) | - |
http.targets[].url | 后端InfluxDB实例HTTP API地址(需包含协议、IP/域名、端口) | - |
http.targets[].timeout | 目标实例请求超时时间(支持s/ms单位) | 5s |
http.targets[].skip-tls-verification | 是否跳过HTTPS证书验证(生产环境不建议启用) | false |
644)





manifest unknown 错误
TLS 证书验证失败
DNS 解析超时
410 错误:版本过低
402 错误:流量耗尽
身份认证失败错误
429 限流错误
凭证保存错误
来自真实用户的反馈,见证轩辕镜像的优质服务