首先拉取鏡像並安裝(expose 表示暴露端口)docker
docker pull tutum/influxdb
docker run -di -p 8083:8083 -p 8086:8086 --expose 8090 --expose 8099 --name influxsrv tutum/influxdb
用瀏覽器打開
操做時候的語句不要本身寫,點右下角(圖上查詢模板那裏)。選擇模板,會自動出來語句的,改改數據庫名稱之類的東西就行。數據庫
模板點的時候靠左一點點,否則點不動。瀏覽器
而後直接回車就好了google
建立完數據庫之後能夠查詢看看有沒翻譯
切換數據庫3d
![](http://static.javashuo.com/static/loading.gif)
建立一個管理員blog
![](http://static.javashuo.com/static/loading.gif)
查看當前數據flux
![](http://static.javashuo.com/static/loading.gif)
(谷歌會本身翻譯……)內存
拉取並建立cAdvisor 的容器get
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 --publish=8080:8080 --detach=true --link influxsrv:influxsrv --name=cadvisor google/cadvisor -storage_driver=influxdb -storage_driver_db=tensquare-db -storage_driver_host=influxsrv:8086
注意把storage_driver_db後面改爲本身的數據庫名
瀏覽器打開
能打開之後數據庫應該就有東西了
標藍那個是內存
拉取並建立Grafana容器
docker pull grafana/grafana
docker run -d -p 3001:3000 -e INFLUXDB_HOST=influxsrv -e INFLUXDB_PORT=8086 -e INFLUXDB_NAME=cadvisor -e INFLUXDB_USER=root -e INFLUXDB_PASS=itcast --link influxsrv:influxsrv --name=grafana grafana/grafana
記得更改用戶名(INFLUXDB_USER)和密碼(INFLUXDB_PASS)
用瀏覽器打開
登陸名和密碼初始都是admin
登錄後要求改密碼
進入主頁面後,添加數據源
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
再點小齒輪就能看到了
添加儀表盤
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
能夠先去個名字
![](http://static.javashuo.com/static/loading.gif)
也能夠不取
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
設置預警線
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
保存儀表盤時,名字不寫就是不作修改