一个web可视化,性能优化的redis监控程序,使用flask + sqlite完成。
Demo Site: http://redis-monitor.atool.org/
欢迎issue和pr。https://github.com/hustcc/redis-monitor
监控数据包括以下:
- redis服务器信息,包括redis版本、上线时间、os系统信息等等
- 实时的消息处理信息,例如处理command数量、连接总数量等
- 联通时间动态图表
- ops时间动态图表
- 内存占用、cpu消耗实时动态图表
redis监控程序很多,为什么还要自己做?
因为我找了很多网上推荐的程序,存在一些问题,导致我没有用起来,除了自己知识欠缺的问题,主要包括:
- 配置麻烦,需要修改代码中的配置文件,而且太难找;
- 版本不兼容,不记得是哪个项目,2.8可以跑起来,但是2.6完全直接启动出错,我也不知道怎么去修改,原谅我的无知;
- 启动麻烦,需要启动两个东东,我也不知道为什么,可能是为了性能上的东西吧!
- 监控程序带来redis性能损耗。
-
首先安装python库
pip install Flask
pip install requests
pip install redis
install sqlite3 environment, linux include.
-
运行web程序即可
./run_monitor
or
python run_monitor.py
PS: change run_monitor mode to 755.
-
本地打开127.0.0.1:7259就可以看完网页了。截图见下方!
- basic information
- connection time gragh
- ops time gragh
- cpu and mem