littlepeng / redis-monitor Goto Github PK
View Code? Open in Web Editor NEWThis project forked from nkrode/redislive
monitor redis perfmonance、master-slave status
License: MIT License
This project forked from nkrode/redislive
monitor redis perfmonance、master-slave status
License: MIT License
I don't find the place to replace morning / afternoon Chinese language in the time series widget. Could you help? Thanks a lot!
providing a password for stats server block is unrecognized.
Hi, Peng. Thanks for your great work, and I have a problem when I visit http://myip:8888/index.html. It return "404: Not Found" for me. Can you help me to resolve it?
[root@bigdata239 src]# python redis_monitor.py --duration 120
add 10.110.17.238:7001
add 10.110.17.237:7002
add 10.110.17.236:7002
add 10.110.17.238:7002
add 10.110.17.236:7000
add 10.110.17.238:7000
add 10.110.17.237:7001
add 10.110.17.236:7001
add 10.110.17.237:7000
[redis]PRSOnline-M2(10.110.17.237:7002):slave status OK.({'ip': '10.110.17.238', 'state': 'online', 'lag': 0, 'port': 7000, 'offset': 517035})
[Errno 111] Connection refused
[redis]PRSOnline-M4(10.110.17.238:7002):slave status OK.({'ip': '10.110.17.236', 'state': 'online', 'lag': 0, 'port': 7001, 'offset': 516811}{'ip': '10.110.17.237', 'state': 'online', 'lag': 1, 'port': 7000, 'offset': 516797})
[Errno 111] Connection refused
[redis]PRSOnline-M4(10.110.17.238:7002):slave status OK.({'ip': '10.110.17.236', 'state': 'online', 'lag': 0, 'port': 7001, 'offset': 516811}{'ip': '10.110.17.237', 'state': 'online', 'lag': 1, 'port': 7000, 'offset': 516811})
[Errno 111] Connection refused
[redis]PRSOnline-Master1(10.110.17.238:7001):slave status OK.({'ip': '10.110.17.236', 'state': 'online', 'lag': 1, 'port': 7000, 'offset': 516811})
[Errno 111] Connection refused
[redis]PRSOnline-M3(10.110.17.236:7002):slave status OK.({'ip': '10.110.17.237', 'state': 'online', 'lag': 0, 'port': 7001, 'offset': 516825})
[Errno 111] Connection refused
[redis]PRSOnline-M2(10.110.17.237:7002):slave status OK.({'ip': '10.110.17.238', 'state': 'online', 'lag': 0, 'port': 7000, 'offset': 517049})
[Errno 111] Connection refused
Hi LittlePeng!
I build tool redis-monitor from your source , first I add 30 instance , result working OK, then I add about 100 redis instance , result server response status 500 loading (tab Overview).
Can you help me fix error 500?
This is debug log file get 500 error
Traceback (most recent call last):
File "/usr/lib64/python2.6/site-packages/tornado/web.py", line 1467, in _execute
result = method(*self.path_args, **self.path_kwargs)
File "/build/redis-monitor/api/controller/InfoListController.py", line 16, in get
info=self.getStatsPerServer((server['server'],server['port']))
File "/build/redis-monitor/api/controller/BaseController.py", line 30, in getStatsPerServer
slaves += info["slave" + (str)(i)]
TypeError: cannot concatenate 'str' and 'dict' objects
I found the line end character is ^M on linux(ubuntu) . We know dos2unix or unix2dos tool but it has better to update this . Actually some linux distributions have no dos2unix default .
2015-07-10 13:39:15.183334
Traceback (most recent call last):
File "redis_monitor.py", line 89, in run
self.LogInfo(redis_info, current_time, self.last)
File "redis_monitor.py", line 185, in LogInfo
self.stats_provider.save_keys_Info(self.id, last.key , current_time, expires, persists,
AttributeError: 'RedisStatsProvider' object has no attribute 'save_keys_Info'
I used pip install -r requirements.txt
to install python packages, the default redis-py is 3.0.1.
when i start python redis_monitor.py
, some error happened
2019-01-31 13:17:39.020112
Traceback (most recent call last):
File "redis_monitor.py", line 88, in run
self.LogInfo(redis_info, current_time, self.last)
File "redis_monitor.py", line 185, in LogInfo
expired, evicted, hit_rate, commands, used_memory, peak_memory)
File "/usr/local/redis-monitor/src/dataprovider/redisprovider.py", line 33, in save_keys_Info
self.conn.zadd(server +':'+ rediskey, score, data)
File "/usr/lib/python2.7/site-packages/redis/client.py", line 2263, in zadd
for pair in iteritems(mapping):
File "/usr/lib/python2.7/site-packages/redis/_compat.py", line 94, in iteritems
return x.iteritems()
AttributeError: 'int' object has no attribute 'iteritems'
then I found redis-py 3.xx had some changes https://github.com/andymccurdy/redis-py#mset-msetnx-and-zadd
def mset(self, mapping):
def msetnx(self, mapping):
def zadd(self, name, mapping, nx=False, xx=False, ch=False, incr=False):
so, we need do some compatible or prompt user to install redis-py
2.x version?
Traceback (most recent call last):
File "redis_monitor.py", line 88, in run
self.LogInfo(redis_info, current_time, self.last)
File "redis_monitor.py", line 185, in LogInfo
expired, evicted, hit_rate, commands, used_memory, peak_memory)
File "/kuyu/soft/redis-monitor-master/src/dataprovider/redisprovider.py", line 33, in save_keys_Info
self.conn.zadd(server +':'+ rediskey, score,data)
File "/usr/lib/python2.7/site-packages/redis/client.py", line 2685, in zadd
for pair in iteritems(mapping):
File "/usr/lib/python2.7/site-packages/redis/_compat.py", line 133, in iteritems
return x.iteritems()
AttributeError: 'int' object has no attribute 'iteritems'
What happened?
when i visit the url http://ip:8888/, i met with difficulties about '403: Forbidden'。and how can i see the log? where is the log path? when run daemon
who can tell me how to use the sms alert,and "sms_alert": "192.168.110.207:9999" in the redis_live.conf use for what?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.