influxdb
docker pull tutum/influxdb
docker run -d -p 8083:8083 -p 8086:8086 --name influxdb tutum/influxdb
cAdvisor
docker pull google/cadvisor
docker run \
--volume=/:/rootfs:ro \
--volume=/var/run:/var/run:rw \
--volume=/sys:/sys:ro \
--volume=/var/lib/docker/:/var/lib/docker:ro \
--link influxdb:influxdb \
--publish=8081:8080 \
--detach=true \
--name=cadvisor \
google/cadvisor \
-storage_driver=influxdb \
-storage_driver_db=cadvisor \
-storage_driver_host=influxdb:8086
解决cadvisor容器不能启动:
sudo mount -o remount,rw '/sys/fs/cgroup'
sudo ln -s /sys/fs/cgroup/cpu,cpuacct /sys/fs/cgroup/cpuacct,cpu
Grafana
docker pull grafana/grafana
docker run -d \
-p 3000:3000 \
-e INFULXDB_HOST=localhost \
-e INFULXDB_PORT=8086 \
-e INFULXDB_NAME=cadvisor \
-e INFULXDB_USER=cadvisor \
-e INFULXDB_PASS=cadvisor \
--link influxdb:influxsrv \
--name grafana \
grafana/grafana