1. 环境
- redis集群版本: 3.2.1
- CentOS Linux release 7.2.1511 (Core)
2. 安装包
eventmachine-1.2.3.gem、redis-stat-0.4.14.gem、thin-1.5.1.gem、daemons-1.1.9.gem
gem下载网站:https://rubygems.org/gems
redis-stat下载:https://github.com/junegunn/redis-stat
3. 安装过程
本来想用redislive监控但是按照完发现使用的python redis模块不支持集群连接。
gem install eventmachine-1.2.3.gem
gem install thin-1.5.1.gem
gem uninstall daemons
gem install daemons-1.1.9.gem
[root@EPC-SH-COL-06 RedisLive]# gem install redis-stat --no-document
Successfully installed redis-stat-0.4.14
WARNING: Unable to pull data from 'https://rubygems.org/': no such name (https://rubygems.org/specs.4.8.gz)
WARNING: Unable to pull data from 'https://rubygems.org/': no such name (https://rubygems.org/specs.4.8.gz)
WARNING: Unable to pull data from 'https://rubygems.org/': no such name (https://rubygems.org/specs.4.8.gz)
WARNING: Unable to pull data from 'https://rubygems.org/': no such name (https://rubygems.org/specs.4.8.gz)
WARNING: Unable to pull data from 'https://rubygems.org/': no such name (https://rubygems.org/specs.4.8.gz)
WARNING: Unable to pull data from 'https://rubygems.org/': no such name (https://rubygems.org/specs.4.8.gz)
WARNING: Unable to pull data from 'https://rubygems.org/': no such name (https://rubygems.org/specs.4.8.gz)
WARNING: Unable to pull data from 'https://rubygems.org/': no such name (https://rubygems.org/specs.4.8.gz)
WARNING: Unable to pull data from 'https://rubygems.org/': no such name (https://rubygems.org/specs.4.8.gz)
WARNING: Unable to pull data from 'https://rubygems.org/': no such name (https://rubygems.org/specs.4.8.gz)
WARNING: Unable to pull data from 'https://rubygems.org/': no such name (https://rubygems.org/specs.4.8.gz)
WARNING: Unable to pull data from 'https://rubygems.org/': no such name (https://rubygems.org/specs.4.8.gz)
WARNING: Unable to pull data from 'https://rubygems.org/': no such name (https://rubygems.org/specs.4.8.gz)
WARNING: Unable to pull data from 'https://rubygems.org/': no such name (https://rubygems.org/specs.4.8.gz)
WARNING: Unable to pull data from 'https://rubygems.org/': no such name (https://rubygems.org/specs.4.8.gz)
1 gem installed
3. 问题&解决
[root@EPC-SH-COL-06 RedisLive]# redis-stat
/usr/local/share/gems/gems/redis-3.0.2/lib/redis.rb:182: warning: wrong element type nil at 0 (expected array)
/usr/local/share/gems/gems/redis-3.0.2/lib/redis.rb:182: warning: ignoring wrong elements is deprecated, remove them explicitly
/usr/local/share/gems/gems/redis-3.0.2/lib/redis.rb:182: warning: this causes ArgumentError in the next release
/usr/local/share/gems/gems/redis-3.0.2/lib/redis.rb:182: warning: wrong element type nil at 19 (expected array)
/usr/local/share/gems/gems/redis-3.0.2/lib/redis.rb:182: warning: ignoring wrong elements is deprecated, remove them explicitly
/usr/local/share/gems/gems/redis-3.0.2/lib/redis.rb:182: warning: this causes ArgumentError in the next release
解决方法:
https://github.com/redis/redis-rb/commit/aff1b8d0c4d466ff29214e72ce202224695783c9
4. 启动和访问:
redis-stat 172.17.50.78:6379 172.17.50.77:6379 172.17.50.76:6379 172.17.50.75:6379 172.17.50.74:6379 172.17.50.73:6379 --daemon --server=9209 5
--server参数为web端口
http://127.0.0.1:9209