转自:https://leehao.me/Redis-图形化监控方案-RedisLive-介绍/
作者:Leo
作为一款开源的 Redis 图形化监控工具,RedisLive 提供对 Redis 实例的内存使用情况,接收的客户端命令,接收的请求数量以及键进行监控。RedisLive 的工作原理基于 Redis 的 INFO 和 MONITOR 命令,通过向 Redis 实例发送 INFO 和 MONITOR 命令来获取 Redis 实例当前的运行数据。
RedisLive 提供的图形化展示界面如下图所示:
|
git clone https://github.com/kumarnitin/RedisLive.git
|
|
argparse==1.2.1 python-dateutil==1.5 redis tornado==2.1.1
|
|
pip install -r requirements.txt -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
|
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
|
{ "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 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
{ "RedisServers": [ { "server": "127.0.0.1", "port" : 6379 } ], "DataStoreType" : "sqlite", "SqliteStatsStore" : { "path": "db/redislive.sqlite" } }
|
|
./redis-monitor.py --duration=120
|
http://localhost:8888/index.html,按下回车后,便可以看到
Redis 实例的监控数据。