Redis集群监控及Redis桌面客户端

朱雀 2022-06-17 06:20 333阅读 0赞

之前在生产环境部署了Redis集群,一直苦于没有工具监控,最近找了下网上推荐redmon和Redislive的比较多,查看了两个项目的github,都几年没有更新,这两个项目应该没有人在维护了,如果哪位有更好的替代方案麻烦告知!

仅将自己的部署方案贴出来,以供自己翻查!

具体步骤参考自redislive 的github安装文档:————————-http://www.nkrode.com/article/real-time-dashboard-for-redis

环境:

CentOS7.2-1511 minimal

python 2.7.5

安装依赖组件:

1、yum install epel-release

  1. yum install python-devel python-setuptools python-pip
  2. pip install redis
  3. pip install dateutil(内网通过挂载本地yum源安装的)

pip install tornado(内网通过下载tornado-1.2.1.tar.gz python setup.py install)

如果是python2.7以下,还需要安装pip install argparse 官方文档说明

2、安装过程中如有报错,安装相应的依赖即可(内网可通过外网虚机 yum install —downloadonly —downloaddir 方式下载安装)

3、下载github源码

  1. git clone https://github.com/nkrode/RedisLive.git 或者直接下载解压

4、配置文件更改

  1. \#cd nkrode-RedisLive-6debcb6

#cd src

  1. mv redis-live.conf.example redis-live.conf

#vi redis-live.conf

注意打开的方式,部分编辑工具会进入非法字符

原始的配置文件如下:

[plain] view plain copy

在CODE上查看代码片 派生到我的代码片

  1. {
  2. “RedisServers”:
  3. [
  4. {
  5. “server”: “154.17.59.99”,
  6. “port” : 6379
  7. },
  8. {
  9. “server”: “localhost”,
  10. “port” : 6380,
  11. “password” : “some-password”
  12. }
  13. ],
  14. “DataStoreType” : “redis”,
  15. “RedisStatsServer”:
  16. {
  17. “server” : “ec2-184-72-166-144.compute-1.amazonaws.com”,
  18. “port” : 6385
  19. },
  20. “SqliteStatsStore” :
  21. {
  22. “path”: “to your sql lite file”
  23. }
  24. }

部分配置参数说明:

RedisStatsServer: 如果存储类型选择了reids,就需要配置此项,即另外拿出一个redis来存储其他redis的状态信息,也就是上面说的元数据。

SqliteStatisStore: 如果存储类型选择了sqlite,就配置此项,指定一个路径保存sqlite文件。

5、服务启动

./redis-monitor.py —duration=120

./redis-live.py

http://192.168.1.101:8888/index.html

以上两个进程都是默认前台运行,可以后台去执行

nohup ./redis-monitor.py —duration=36000 —quiet &

  1. nohup ./redis-live.py --log\_file\_prefix=/home/user/log/redis\_live --logging=warning &

6、redis-client

RedisDesktopManager下载地址 https://redisdesktop.com/ 有windows Linux mac版本,下载建立连接即可。

http://bbs.redis.cn/forum.php?mod=viewthread&tid=840

发表评论

表情:
评论列表 (有 0 条评论,333人围观)

还没有评论,来说两句吧...

相关阅读