redis监控工具

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_36666651/article/details/82882345

redis-monitor

项目github地址:https://github.com/NetEaseGame/redis-monitor (看作者名称,应该是华科的)

# 安装 
pip install redis-monitor

#初始化
 redis-monitor init

#启动
nohup redis-monitor start > redis-monitor.log &

然后web访问http://IP:9527,在web界面进行操作即可。



RedisLive

项目github地址:https://github.com/nkrode/RedisLive

pip install tornado
pip install redis
pip install python-dateutil
pip install argparse (python版本低于2.7需要安装,可使用python查看版本)
# 下载项目
git clone https://github.com/kumarnitin/RedisLive.git

修改配置文件redis-live.conf (项目里面叫redis-live.conf.sample)
PS:不支持sentinel,不要配置sentinel的节点,会报错

{
"RedisServers": //数组配置多个待监控的Reids实例
[
{
"server": "192.168.2.128",
"port" : 6379
},
{
"server": "localhost",
"port" : 6380,
"password" : "some-password" //指定Redis服务连接密码
}
],
"DataStoreType" : "redis", //监控数据存储[redis|sqlite] 不建议使用redis(简单测试是可以用redis,方便),db相关的在源码src/db目录下
"RedisStatsServer": //DataStoreType=redis时候,指定redis连接地址
{
"server" : "127.0.0.1",
"port" : 6385
},
"SqliteStatsStore" : //DataStoreType=sqlite,指定db路径
{
"path": "/usr/local/RedisLive/src/db/redislive.db"
}
}

运行:

./redis-monitor.py --duration=120 & #启动监控脚本 [duration监控持续时间(秒)],建议使用crontab定时运行
./redis-live.py & #启动web服务
使用浏览器打开http://localhost:8888/index.html查看监控页面


猜你喜欢

转载自blog.csdn.net/qq_36666651/article/details/82882345