redis集群监控之Redis monitor部署

为了对以后有可能面临的redis集群监控做准备,这两天在准备这方面的事情,现在将其中的过程记录一下。

首先是“Ronney-Hua”的这篇文章对三中开源监控软件做了对比

文章地址:https://blog.csdn.net/github_38358734/article/details/70264887

接下来在github上下载了他的开源项目,项目地址:https://github.com/LittlePeng/redis-monitor

ps(这儿还有一位美女也有同样的文章和项目,也同样贴出来:https://segmentfault.com/a/1190000004042191,只是这位大哥的项目我跑了起来,这位美女的项目我i还没来得及跑)

接下来讲讲跑这位大哥项目时的注意事项:

(我现在是监控了两个redis,且不同步)

1.  大哥项目是python2.7的 开始我linux用的时CentOS6.9,自带的python时2.6.6,不支持pip,换成CentOS7,自带python2.7就解决了。

2.   pip install -r requirements.txt  这条命令用来安装项目中requirements.txt 这个文件中项目所依赖的包

3.  起redis (安装和启动redis这篇文章中有详细讲解:http://blog.mayongfa.cn/258.html。 这篇文章中讲更改redis.conf配置文件中bind时我这儿遇到了一些问题,当我按照他说的在127.0.0.1后增加ip时会导致redis起不来,后来我直接将bind后边直接改为 * ,不知道有没有用。)

4.  更改 redis-monitor-master/src 下redis_live.conf配置文件中的参数

5.  cd  redis-monitor-master/src   执行 python redis_live.py

这个执行后web就可以跑起来了    http://127.0.0.1:8888/index.html

6.  但是master起来了 slave还没起来,  执行: python redis_monitor.py 

一半这时会报错:

这是防火墙没关,需要关闭防火墙(centos6和centos7的防火墙关闭方式还不一样。自行百度吧 https://jingyan.baidu.com/article/359911f5bffb5257fe030630.html)

这下应该就好了  在这儿就可以看到自己的redis了 http://127.0.0.1:8888/index.html

好了,暂时先到这里吧

猜你喜欢

转载自www.cnblogs.com/ss-py/p/9263755.html