live

Redis live
Redis Live是一个用来监控redis实例,分析查询语句并且有web界面的监控工具,使用python编写

Install Dependencies

pip

下载地址: https://pypi.python.org/pypi/pip#downloads
pip 依赖 setuptools
Finished processing dependencies for setuptools==32.3.1

1
2
3
4
$tar -zxvf  pip-9.0.1.tar.gz
$python setup.py build
$sudo python setup.py install
Finished processing dependencies for pip==9.0.1

Finished processing dependencies for python-dateutil==2.6.0

Finished processing dependencies for redis==2.10.5

1
$sudo apt-get install build-essential python-dev

Dpkg: Warning: ** ldconfig ** could not be found in the PATH environment variable or no executable privileges
Tip: The root PATH environment variable should normally contain ** / usr / local / sbin, / usr / sbin, and / sbin **

1
2
3
4
$locate ldconfig   #sbin目录存在 ldconfig
$sudo mousepad ~/.bashrc
export PATH=/usr/loca/sbin:/usr/sbin:/sbin:$PATH
$source ~/.bashrc

Finished processing dependencies for tornado==4.5.dev1

列出安装的packages

1
$ sudo pip freeze

redislive

1
git clone https://github.com/kumarnitin/RedisLive.git

配置文件redis-live.conf【redis-live.conf.example】

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{
"RedisServers":
[
{
"server": "154.17.59.99",
"port" : 6379
},

{
"server": "localhost",
"port" : 6380,
"password" : "some-password"
}
],

"DataStoreType" : "redis",

"RedisStatsServer":
{
"server" : "ec2-184-72-166-144.compute-1.amazonaws.com",
"port" : 6385
},

"SqliteStatsStore" :
{
"path": "to your sql lite file"
}
}

启动服务

1
2
./redis-monitor.py --duration=30     //启动监控,duration是心跳时间
./redis-live.py //启动web服务,默认监听8888端口

env: …py 权限不够
给予执行权

1
2
chmod +x  redis-monitor.py
chmod +x redis-live.py

打开 http://localhost:8888/index.html

点击打赏
文章目录
  1. 1. Install Dependencies
  2. 2. pip
  3. 3. redislive
载入天数...载入时分秒... ,