cadvisor

wavefronthq/cadvisor Docker Image

wavefronthq

用于将容器资源指标收集到Wavefront的cAdvisor容器。

2 次收藏下载次数: 0状态:社区镜像维护者:wavefronthq仓库类型:镜像最近更新:

wavefronthq/cadvisor 镜像文档

镜像概述

该镜像包含cAdvisor的最新构建版本,并集成了Wavefront存储驱动,用于将容器资源指标收集并发送至Wavefront平台,实现容器监控数据的集中管理与分析。

核心功能和特性

  • 将cAdvisor收集的所有标准资源指标存储到Wavefront
  • 将容器标签作为点标签添加到指标中,提供更多可查询维度
  • 支持在运行时添加任意标签
  • 可配置刷新阈值

使用场景

适用于需要对容器化环境进行资源监控,并将监控数据集中发送至Wavefront平台的场景,如容器资源使用分析、性能监控、故障排查等。

使用方法和配置说明

Docker Run 命令

bash
sudo docker run \
  --volume=/:/rootfs:ro \
  --volume=/var/run:/var/run:rw \
  --volume=/sys:/sys:ro \
  --volume=/var/lib/docker/:/var/lib/docker:ro \
  --publish=8080:8080 \
  --detach=true \
  --name=cadvisor \
  wavefronthq/cadvisor:latest \
  -storage_driver=wavefront \
  -storage_driver_wf_source=$(hostname) \
  -storage_driver_wf_proxy_host=YOUR_PROXY_HOST:2878

参数说明:

  • --volume:挂载主机目录,用于cAdvisor收集主机和容器信息
  • --publish:映射容器端口8080到主机,提供Web访问
  • -storage_driver=wavefront:指定使用Wavefront存储驱动
  • -storage_driver_wf_source:设置指标来源名称,默认使用主机名
  • -storage_driver_wf_proxy_host:Wavefront代理主机地址和端口,需替换为实际代理地址

Docker Compose 示例

yaml
cadvisor:
  container_name: cadvisor
  image: docker.xuanyuan.run/wavefronthq/cadvisor:latest
  command: -storage_driver=wavefront -storage_driver_wf_source=$(hostname) -storage_driver_wf_proxy_host=YOUR_PROXY_HOST:2878
  restart: always
  ports:
    - "8080:8080"
  volumes:
    - /:/rootfs:ro
    - /var/run:/var/run:rw
    - /sys:/sys:ro
    - /var/lib/docker/:/var/lib/docker:ro

配置说明:

  • restart: always:确保容器异常退出后自动重启
  • volumes:挂载必要的主机目录,确保cAdvisor能正常收集容器和主机信息
  • command:指定启动参数,配置Wavefront存储驱动相关参数

关键配置参数

参数说明
-storage_driver=wavefront启用Wavefront存储驱动
-storage_driver_wf_source设置指标来源标识,建议使用主机名
-storage_driver_wf_proxy_hostWavefront代理的主机地址和端口(默认端口2878)
-storage_driver_tag运行时添加的额外标签,格式为key=value
-storage_driver_flush_interval指标刷新间隔(默认10秒)

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 cadvisor 镜像标签

docker pull docker.xuanyuan.run/wavefronthq/cadvisor:<标签>

DockerHub 原生拉取命令

docker pull wavefronthq/cadvisor:<标签>
专业版 · 高速稳定拉取镜像
50GB 仅 ¥8/年
高速镜像下载在线技术支持专业版保障服务可用付费会员免广告