RedisLive安装
环境安装
Python2.7
[root@ ~]# yum install -y readline readline-devel
[root@ ~]# yum install sqlite-devel
[root@ ~]# tar xf Python-2.7.10.tar.xz
[root@ ~]# cd Python-2.7.10
[root@ Python-2.7.10]# ./configure
[root@ Python-2.7.10]# make && make install
# 注意保留yum命令还是使用python2.6
[root@ Python-2.7.10]# rm -rf /usr/bin/python
[root@ Python-2.7.10]# ln -sv /usr/local/bin/python2.7 /usr/bin/python
[root@ Python-2.7.10]# python -V
Python 2.7.10
pip
[root@ ~]# wget http://peak.telecommunity.com/dist/ez_setup.py
[root@ ~]# python ez_setup.py
[root@ ~]# easy_install pip
tornado
[root@ ~]# pip install tornado
redis的python版SDK
[root@ ~]# pip install redis
时间工具
[root@ ~]# pip install python-dateutil
安装RedisLive
下载源码
[root@ ~]# git clone https://github.com/kumarnitin/RedisLive.git
[root@ ~]# cp RedisLive/src /usr/local/RedisLive -r
配置
[root@ ~]# cd /usr/local/RedisLive
[root@ RedisLive]# ll
total 44
drwxr-xr-x 4 root root 4096 May 28 12:09 api
drwxr-xr-x 2 root root 4096 May 28 12:12 dataprovider
drwxr-xr-x 2 root root 4096 May 28 12:12 db
-rw-r--r-- 1 root root 0 May 28 11:18 __init__.py
-rw-r--r-- 1 root root 381 May 28 11:18 redis-live.conf.example
-rwxr-xr-x 1 root root 1343 May 28 11:18 redis-live.py
-rwxr-xr-x 1 root root 9800 May 28 11:18 redis-monitor.py
drwxr-xr-x 2 root root 4096 May 28 11:18 util
drwxr-xr-x 4 root root 4096 May 28 11:18 www
[root@ RedisLive]# vim redis-live.conf
{
"RedisServers":
[
{
"server": "127.0.0.1",
"port" : 6000,
"password" : "896bbc"
},
{
"server": "127.0.0.1",
"port" : 6001,
"password" : "896bbc"
},
{
"server": "127.0.0.1",
"port" : 6002,
"password" : "896bbc"
}
],
"DataStoreType" : "sqlite",
"SqliteStatsStore" :
{
"path": "db/redislive.sqlite"
}
}
- RedisServers:监控的 Redis 实例列表,RedisLive 支持同时监控多个 Redis 实例
- RedisStatsServer:用来存储监控数据的 Redis 实例,此配置不同于 RedisServers,RedisLive 并不监控 RedisStatsServer,RedisStatsServer 只是用作存储监控数据使用
- DataStoreType:监控数据的存储方案,可以配置为redis或者sqlite
- SqliteStatsStore:存储监控数据的 sqlite 配置
整个配置实际上是一个json对象,RedisServers是redis服务器的信息,由于是数组类型所以配置多个redis实例。DataStoreType是监控信息的存储方式,有”redis”和” sqlite”两种方式,分别对应下面RedisStatsServer和SqliteStatsStore,编辑完成后保存。
配置完成后,便可以将 RedisLive 运行起来。RedisLive 的运行包括两个部分(在 RedisLive/src 目录),redis-monitor.py用于向 Redis 实例发送 INFO 和 MONITOR 命令并获取其返回,redis-live.py 用于运行 Web 服务器。
我们首先启动redis-monitor.py脚本,并将duration参数设置为 120 秒。duration参数指定了监控脚本的运行持续时间,例如设置为 120 秒,即经过 120 秒后,监控脚本会自动退出,并在终端打印 shutting down… 的提示。
[root@ RedisLive]#./redis-monitor.py --duration=120 & //启动监控,duration是心跳时间
[root@ RedisLive]#./redis-live.py & //启动web服务,默认监听8888端口
需要指出的是,由于redis-monitor.py脚本采用向 Redis 实例发送 MONITOR 命令和 INFO 命令的方式来取得监控数据,而 MONITOR 命令对于 Redis 实例的性能有较大影响,因此,对于生产环境下的redis-monitor.py的部署,需要设置一个较适宜的duration参数,并使用 crontab 来定时执行该脚本。
访问 http://192.168.1.149:8888/index.html
RedisLive安装的更多相关文章
- Redis服务监控之RedisLive安装部署(亲测可用)
一.Redis服务安装部署 1.redis安装(linux系统) 下载 https://redis.io/ 安装依赖 yum install gcc tcl 解压.编译.安装(make & m ...
- 采用RedisLive监控Redis服务——安装手册
#1.gcc编译环境确认 .tgz cd Python- ./configure /bin/python2. /usr/bin/python #运行python查看版本 python -V #进行更改 ...
- Redis 服务监控 redis-faina 命令查看 和 redis-live 界面查看
Redis现在在很多公司中应用已经很广泛了,但是如何监控redis,实时的观察redis的性能,下面就关于Redis的常用监控介绍一下. 一.使用redis自带的info命令和monitor命令现在常 ...
- 在 windows 环境下安装 redislive
这是一篇在 windows 环境下安装 redislive 的教程! 项目地址:https://github.com/nkrode/RedisLive 配置文档:http://www.nkrode.c ...
- 在Linux CentOS 6.6上安装RedisLive
Real time dashboard for redis 安装必须软件 1.安装pip到指定的python版本下面: curl -O https://bootstrap.pypa.io/get-pi ...
- CentOS.56安装Redis监控工具RedisLive
RedisLive是一款开源的基于WEB的reids的监控工具,以WEB的形式展现出redis中的key的情况,实例数据等信息! RedisLive在github上的地址:https://github ...
- 安装Redis图形监控工具---RedisLive
RedisLive简介 RedisLive是一款用Python编写基于WEB的Redis图形监控工具,也是一款实时监控Redis数据的开源软件,以WEB的形式展现出redis中的key的情况,实例数据 ...
- 在Centos中部署redis运行状态图形化监控工具 — RedisLive
写在前面 前两天看到张善友老师的一篇文章<先定个小目标, 使用C# 开发的千万级应用>,里面给出了一张腾讯OA基础服务中redis运行情况的一张监控图,然后想到自己的项目中前不久也上了re ...
- 使用强大的可视化工具redislive来监控我们的redis,别让自己死的太惨~~~
作为玩windows的码农,在centos上面装点东西,真的会崩溃的要死,,,我想大家也知道,在centos上面,你下载的是各种源代码,需要自己编译...而 使用yum的话,这个吊软件包有点想nuge ...
随机推荐
- cocos2d-x JS 四人麻将中的服务器位置与客户端位置转换相关
前言:在写各类游戏编程中,都会遇到一个问题,就是位置问题,服务端的位置是与客户端的位置是不同的,这中间需要进行一个转化,客户端一套代码运行,不管是任何人登陆,该位置始终都是在屏幕正下方,所以这样就要进 ...
- RF基础(一) RF内建函数库BuiltIn
Robot framework做为一个测试框架,并不是只能做selenium测试,是支持扩展的, 比如说,你引用requests库就可以做接口测试, 那么无论你用什么库 首先要了解, RF本身提供的内 ...
- LocalStorage存储和cookie存储
localStorage是H5的新特性,主要用来本地存储,一般浏览器支持的大小是5M,不同浏览器会有所不同,解决了cookie存储空间不足的问题. 2.使用: ⑴.存 if(!window.l ...
- ES6学习之 解构赋值
最近看了一个vue的项目,发现作者大量使用了ES6的语法,包括async, Promise, Set, Map还有一些解构赋值, 才发现自己对于ES6的语法缺乏了总结和运用,看得有点艰难,所以重新学习 ...
- EL的隐含对象(一)【页面上下文对象】
页面上下文对象为pageContext,用于访问JSP内置对象(例如:request.response.out.session.exception.page等)和ServletContext.在获取到 ...
- Python - 1. Built-in Atomic Data Types
From:http://interactivepython.org/courselib/static/pythonds/Introduction/GettingStartedwithData.html ...
- Keep On Movin (贪心)
#include<bits/stdc++.h> using namespace std; int main(){ int T, n, a;scanf("%d",& ...
- XML系列之--对电文格式XML的简单操作(三)
前两章介绍了关于Linq创建.解析SOAP格式的XML,在实际运用中,可能会对xml进行一些其它的操作,比如基础的增删该查,而操作对象首先需要获取对象,针对于DOM操作来说,Linq确实方便了不少,如 ...
- QWidget 的 close 与 Qt::WA_DeleteOnClose
[1]close 与 Qt::WA_DeleteOnClose简介 1.1 Qt源码 /*! Closes this widget. Returns \c true if the widget was ...
- g++编译
命令: otool -L xx.lib 查看mac os 动态库依赖的包 ldd xx.so 查看linux动态库依赖的包 c++打包动态库java调用,mac上没问题到linux上就是不行,g++命 ...