如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
Consul Telemetry Collector是基于OpenTelemetry规范构建的轻量级遥测数据收集器,专注于Consul服务网格的可观测性数据采集与处理。该镜像旨在简化Consul环境中的遥测数据收集流程,支持指标(Metrics)、日志(Logs)和分布式追踪(Traces)的标准化采集,并可灵活导出至各类可观测性平台。其轻量级设计使其适用于边缘环境、容器化部署及资源受限场景。
bashdocker run -d \ --name consul-telemetry-collector \ -v $(pwd)/otel-config.yaml:/etc/otel/config.yaml \ -e CONSUL_ADDR=http://consul-agent:8500 \ -e OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317 \ -p 8889:8889 \ hashicorp/consul-telemetry-collector:latest
参数说明:
-v:挂载本地配置文件到容器内默认配置路径-e:设置环境变量(Consul地址、导出端点等)-p:暴露Prometheus指标端口(如需本地采集)yamlversion: '3.8' services: consul-agent: image: hashicorp/consul:latest command: agent -dev -client=0.0.0.0 ports: - "8500:8500" consul-telemetry-collector: image: hashicorp/consul-telemetry-collector:latest volumes: - ./otel-config.yaml:/etc/otel/config.yaml environment: - CONSUL_ADDR=http://consul-agent:8500 - OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317 - LOG_LEVEL=info depends_on: - consul-agent ports: - "8889:8889" # Prometheus指标暴露端口 otel-collector: image: otel/opentelemetry-collector-contrib:latest volumes: - ./otel-collector-config.yaml:/etc/otelcol-contrib/config.yaml ports: - "4317:4317" # OTLP gRPC接收端口
| 环境变量名 | 描述 | 默认值 |
|---|---|---|
CONSUL_ADDR | Consul Agent服务地址 | http://localhost:8500 |
OTEL_EXPORTER_OTLP_ENDPOINT | OTLP协议导出端点 | http://localhost:4317 |
LOG_LEVEL | 日志级别(debug/info/warn/error) | info |
CONFIG_PATH | 配置文件路径 | /etc/otel/config.yaml |
COLLECTION_INTERVAL | 数据采集间隔(如"10s") | 10s |
通过挂载配置文件(推荐)自定义采集规则,典型配置结构如下:
yamlreceivers: consul: endpoint: ${CONSUL_ADDR} # 从环境变量获取Consul地址 collection_interval: ${COLLECTION_INTERVAL} # 采集间隔 metrics: include: ["consul.service.*", "consul.client.*"] # 包含指标 exclude: ["consul.debug.*"] # 排除调试指标 processors: batch: # 批量处理优化网络传输 timeout: 2s send_batch_size: 1024 filter: # 过滤特定指标 metrics: include: metric_names: ["consul.service.health", "consul.client.rpc"] exporters: otlp: # 导出至OTLP后端 endpoint: ${OTEL_EXPORTER_OTLP_ENDPOINT} tls: insecure: true # 开发环境禁用TLS验证 prometheus: # 导出至Prometheus endpoint: ":8889" # 暴露Prometheus指标端点 metric_expiration: 12h service: pipelines: metrics: receivers: [consul] processors: [batch, filter] exporters: [otlp, prometheus]
导出至Prometheus
prometheus导出器暴露端点(如:8889)yamlscrape_configs: - job_name: 'consul-telemetry' static_configs: - targets: ['consul-telemetry-collector:8889']
导出至Grafana Cloud
通过OTLP协议对接Grafana Cloud:
yamlexporters: otlp/grafana: endpoint: "otlp-gateway-prod-us-central-0.grafana.net:4317" headers: authorization: "Basic <base64-encoded-api-key>"
telemetry配置段调整)collection_interval减少采集频率,或调整batch处理器参数--memory=256m --cpus=0.5您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

来自真实用户的反馈,见证轩辕镜像的优质服务