Auto-sync: 2026-04-17 08:37

This commit is contained in:
2026-04-17 08:38:12 +08:00
parent 6caa1c2f47
commit a0a48bd334
247 changed files with 6577 additions and 3061 deletions

42
wiki/concepts/cAdvisor.md Normal file
View File

@@ -0,0 +1,42 @@
---
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 ← [[监控可观测性]]