redis-stat安装
安装ruby环境
yum install -y ruby ruby-devel gcc-c++
移除官方镜像源.
gem sources --remove https://rubygems.org/
添加国内源ruby-china。
gem sources -a https://gems.ruby-china.com/
确保只有一个镜像源。
gem sources -l
安装redis-stat
gem install redis-stat
运行redis-stat
redis-stat --server 111.111.111.111 222.222.222.222:63790 123.123.123.123
WEB界面如下:
image.png
帮助文档:
[root@centos7 ~]# redis-stat --help
usage: redis-stat [HOST[:PORT] ...] [INTERVAL [COUNT]]
-a, --auth=PASSWORD Password
-v, --verbose Show more info
--style=STYLE Output style: unicode|ascii
--no-color Suppress ANSI color codes
--csv[=CSV_FILE] Print or save the result in CSV
--es=ELASTICSEARCH_URL Send results to ElasticSearch: [http://]HOST[:PORT][/INDEX]
--server[=PORT] Launch redis-stat web server (default port: 63790)
--daemon Daemonize redis-stat. Must be used with --server option.
--version Show version
--help Show this message
docker运行
docker
docker run --name redis-stat -p 63770:63790 -d insready/redis-stat --server 10.16.1.69:6379 --auth=redis密码
Show the redis stats from a redis docker container
$ docker run --name redis-stat --link some-redis:redis -p 8080:63790 -d insready/redis-stat --server redis
Show the redis stats from a remote redis server
$ docker run --name redis-stat -p 8080:63790 -d insready/redis-stat --server 123.123.123.123
Show the redis stats from multiple servers
$ docker run --name redis-stat -p 8080:63790 -d insready/redis-stat --server 111.111.111.111 222.222.222.222:63790 123.123.123.123
docker-compose
redis-stat:
image: insready/redis-stat
container_name: redis_stat
command: --server rds.yb.host.com:6379 5 --auth=redis密码 #5秒刷新一次数据
expose:
- "63790"
ports:
- "63770:63790"
restart: always
networks:
- redis_net
网友评论