You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Go to file
Marvin Steadfast 8cbbf75159
continuous-integration/drone/push Build is passing Details
drone uses DOCKER_HOST instead of shared docker sock
4 years ago
.github/workflows Upgrading golangci-lint to 1.28.0 4 years ago
accelerators Make NVIDIA capitalization consistent in comments 4 years ago
build update release documentation 4 years ago
cache Some linting errors (#2532) 4 years ago
client Carefully fixing style (#2509) 4 years ago
cmd Move mount library dependency from utils/mount to mount-utils 4 years ago
collector Carefully fixing style (#2509) 4 years ago
container add clean operation when watchForNewContainers/Start failed 4 years ago
deploy Fixed https proxy issue by installing 'full' wget in alpine-based build stage 4 years ago
devicemapper Carefully fixing style (#2509) 4 years ago
docs Add flags that were not previously published 4 years ago
events gofmt must be checked too 4 years ago
fs Move mount library dependency from utils/mount to mount-utils 4 years ago
info Merge pull request #1924 from tianshapjq/add-hugepages-to-attributes 4 years ago
integration Fixing number of liner errors in libpfm-related files 4 years ago
machine Add perf uncore events 4 years ago
manager Merge pull request #2665 from nicktming/fix/add-stop 4 years ago
metrics Aggregate perf metrics 4 years ago
nvm golanci-lint based cleanup (#2503) 4 years ago
perf Use perf attributes from unix lib. 4 years ago
resctrl Add checking if resctrl path exists 4 years ago
stats Getting rid of old version of klog (and some other dependiencies fixed) 4 years ago
storage Move storage, mesos, global container integrations under cmd/internal 4 years ago
summary Introducing interface to hide unexported struct 4 years ago
utils Add perf event grouping. 4 years ago
validate Carefully fixing style (#2509) 4 years ago
version Simplify cAdvisor release versioning 8 years ago
watcher Drop support for rkt - which is now archived 5 years ago
zfs Switch to klog v2 4 years ago
.drone.yml drone uses DOCKER_HOST instead of shared docker sock 4 years ago
.gitignore Add a docker based integration test 4 years ago
.golangci.yml Merge pull request #2513 from iwankgb/deprecated_grpc.WithDialer 4 years ago
AUTHORS Remove mention of contributors file. We don't have one. 10 years ago
CHANGELOG.md changelog for v0.37.0 4 years ago
CONTRIBUTING.md Add CONTRIBUTING.md 10 years ago
LICENSE Migrating cAdvisor code from lmctfy 10 years ago
Makefile Add entry for libpfm related tests to Makefile 4 years ago
README.md Merge pull request #2655 from dashpole/readme_link 4 years ago
doc.go Move main package to cmd subdir 4 years ago
go.mod Move mount library dependency from utils/mount to mount-utils 4 years ago
go.sum Move mount library dependency from utils/mount to mount-utils 4 years ago
logo.png Run PNG crusher on logo.png 8 years ago
test.htdigest Added HTTP Auth and HTTP Digest authentication #302 10 years ago
test.htpasswd Added HTTP Auth and HTTP Digest authentication #302 10 years ago

README.md

cAdvisor

cAdvisor (Container Advisor) provides container users an understanding of the resource usage and performance characteristics of their running containers. It is a running daemon that collects, aggregates, processes, and exports information about running containers. Specifically, for each container it keeps resource isolation parameters, historical resource usage, histograms of complete historical resource usage and network statistics. This data is exported by container and machine-wide.

cAdvisor has native support for Docker containers and should support just about any other container type out of the box. We strive for support across the board so feel free to open an issue if that is not the case. cAdvisor's container abstraction is based on lmctfy's so containers are inherently nested hierarchically.

Quick Start: Running cAdvisor in a Docker Container

To quickly tryout cAdvisor on your machine with Docker, we have a Docker image that includes everything you need to get started. You can run a single cAdvisor to monitor the whole machine. Simply run:

VERSION=v0.36.0 # use the latest release version from https://github.com/google/cadvisor/releases
sudo docker run \
  --volume=/:/rootfs:ro \
  --volume=/var/run:/var/run:ro \
  --volume=/sys:/sys:ro \
  --volume=/var/lib/docker/:/var/lib/docker:ro \
  --volume=/dev/disk/:/dev/disk:ro \
  --publish=8080:8080 \
  --detach=true \
  --name=cadvisor \
  --privileged \
  --device=/dev/kmsg \
  gcr.io/cadvisor/cadvisor:$VERSION

cAdvisor is now running (in the background) on http://localhost:8080. The setup includes directories with Docker state cAdvisor needs to observe.

Note: If you're running on CentOS, Fedora, or RHEL (or are using LXC), take a look at our running instructions.

We have detailed instructions on running cAdvisor standalone outside of Docker. cAdvisor running options may also be interesting for advanced usecases. If you want to build your own cAdvisor Docker image, see our deployment page.

For Kubernetes users, cAdvisor can be run as a daemonset. See the instructions for how to get started, and for how to kustomize it to fit your needs.

Building and Testing

See the more detailed instructions in the build page. This includes instructions for building and deploying the cAdvisor Docker image.

Exporting stats

cAdvisor supports exporting stats to various storage plugins. See the documentation for more details and examples.

Web UI

cAdvisor exposes a web UI at its port:

http://<hostname>:<port>/

See the documentation for more details.

Remote REST API & Clients

cAdvisor exposes its raw and processed stats via a versioned remote REST API. See the API's documentation for more information.

There is also an official Go client implementation in the client directory. See the documentation for more information.

Roadmap

cAdvisor aims to improve the resource usage and performance characteristics of running containers. Today, we gather and expose this information to users. In our roadmap:

  • Advise on the performance of a container (e.g.: when it is being negatively affected by another, when it is not receiving the resources it requires, etc).
  • Auto-tune the performance of the container based on previous advise.
  • Provide usage prediction to cluster schedulers and orchestration layers.

Community

Contributions, questions, and comments are all welcomed and encouraged! cAdvisor developers hang out on Slack in the #sig-node channel (get an invitation here). We also have discuss.kubernetes.io.