可视化管理dashboard中推荐指数:*
0. ceph-dash简介
ceph-dash极其简单,提供类似ceph -s命令的信息及实时的IO速率等。
1. 下载ceph-dash
mkdir /ceph-dash
cd /ceph-dash
git clone https://github.com/Crapworks/ceph-dash.git
2. 安装python-pip(如果系统已经安装,跳过)
sudo apt-get install python-pip
3. 启动ceph-dash
cd /ceph-dash/ceph-dash
./ceph-dash.py
报如下错误,说明没找到flask:
$ ./ceph-dash.py
Traceback (most recent call last):
File "./ceph-dash.py", line 4, in <module>
from app import app
File "/home/yjiang2/ceph-dash/ceph-dash/app/__init__.py", line 9, in <module>
from flask import Flask
ImportError: No module named flask
安装flask:
pip install flask
再次启动ceph-dash
./ceph-dash.py
[2019-07-24 17:50:25,639] WARNING in __init__: No influxdb module found, disabling influxdb support
* Serving Flask app "app" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: on
* Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
* Restarting with stat
[2019-07-24 17:50:25,819] WARNING in __init__: No influxdb module found, disabling influxdb support
* Debugger is active!
* Debugger PIN: 283-878-493
10.38.224.182 - - [24/Jul/2019 17:51:09] "GET / HTTP/1.1" 200 -
10.38.224.182 - - [24/Jul/2019 17:51:09] "GET /static/js/globalize.min.js HTTP/1.1" 200 -
10.38.224.182 - - [24/Jul/2019 17:51:09] "GET /static/css/ceph.dash.css HTTP/1.1" 200 -
10.38.224.182 - - [24/Jul/2019 17:51:09] "GET /static/js/jquery-2.1.4.min.js HTTP/1.1" 200 -
10.38.224.182 - - [24/Jul/2019 17:51:09] "GET /static/js/bootstrap.min.js HTTP/1.1" 200 -
10.38.224.182 - - [24/Jul/2019 17:51:09] "GET /static/js/dx.chartjs.js HTTP/1.1" 200 -
10.38.224.182 - - [24/Jul/2019 17:51:09] "GET /static/css/bootstrap.min.slate.css HTTP/1.1" 200 -
10.38.224.182 - - [24/Jul/2019 17:51:10] "GET /static/js/jquery.flot.time.js HTTP/1.1" 200 -
10.38.224.182 - - [24/Jul/2019 17:51:10] "GET /static/js/jquery.flot.js HTTP/1.1" 200 -
10.38.224.182 - - [24/Jul/2019 17:51:10] "GET /static/js/jquery.flot.byte.js HTTP/1.1" 200 -
10.38.224.182 - - [24/Jul/2019 17:51:10] "GET /static/js/jquery.flot.tooltip.js HTTP/1.1" 200 -
10.38.224.182 - - [24/Jul/2019 17:51:10] "GET /static/js/ceph.dash.js HTTP/1.1" 200 -
10.38.224.182 - - [24/Jul/2019 17:51:10] "GET /static/fonts/glyphicons-halflings-regular.woff HTTP/1.1" 200 -
4. 通过浏览器访问:
如果想修改端口:
修改端口
vi ./ceph-dash.py
app.run(host='0.0.0.0', port=8000, debug=True)