Files
nexus/wiki/concepts/cAdvisor.md
2026-04-17 08:38:12 +08:00

42 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "cAdvisor"
type: concept
tags: [container, monitoring, prometheus, docker]
sources: [家庭监控方案-prometheus-grafana-node-exporter-cadvisor-blackbox]
last_updated: 2026-04-16
---
## Definition
cAdvisorContainer Advisor是 Google 开发的容器指标采集器实时采集容器Docker的资源使用和性能数据提供容器级别的监控。
## Key Metrics
- **CPU**CPU 使用率、限制、throttling
- **内存**:使用量、限制、缓存
- **网络**:入站/出站流量、丢包
- **文件系统**:容器日志大小
- **容器元数据**:镜像、启动命令、标签
## Docker 部署
```yaml
cadvisor:
image: gcr.io/cadvisor/cadvisor:latest
ports:
- "8080:8080"
volumes:
- /:/rootfs:ro
- /var/run:/var/run:ro
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
```
## Common Alert Rules
- 容器重启次数 > 01 小时内)
- 容器 CPU 限制超过 90%
- 容器内存限制超过 85%
## Default Port
- 8080
## Connections
- [[cAdvisor]] ← scrapes_by ← [[Prometheus]]
- [[cAdvisor]] ← container_monitoring ← [[监控可观测性]]