nkrode / RedisLive

Visualize your redis instances, analyze query patterns and spikes.
http://www.nkrode.com/article/real-time-dashboard-for-redis
MIT License
3.07k stars 644 forks source link

can not run redis-monitor.py on CentOS 7.4 with python 2.7.5 #102

Open pgm-rookie opened 5 years ago

pgm-rookie commented 5 years ago

Traceback (most recent call last): File "./redis-monitor.py", line 206, in run used_memory, peak_memory) File "/home/RedisLive-master/src/dataprovider/redisprovider.py", line 30, in save_memory_info self.conn.zadd(server + ":memory", str(timeutils.convert_to_epoch(timestamp)), 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: 'str' object has no attribute 'iteritems' Traceback (most recent call last): File "./redis-monitor.py", line 139, in run str(arguments)) File "/home/RedisLive-master/src/dataprovider/redisprovider.py", line 95, in save_monitor_command pipeline.execute() File "/usr/lib/python2.7/site-packages/redis/client.py", line 3443, in execute return execute(conn, stack, raise_on_error) File "/usr/lib/python2.7/site-packages/redis/client.py", line 3358, in _execute_transaction self.raise_first_error(commands, response) File "/usr/lib/python2.7/site-packages/redis/client.py", line 3392, in raise_first_error raise r ResponseError: Command # 1 (ZINCRBY 127.0.0.1:8088:CommandCount:1544539899 ZINCRBY 1) of pipeline caused error: value is not a valid float

LeoQuote commented 5 years ago

Try update to python 2.7.10 or higher. 2.7.10 works for me.

nonomal commented 5 years ago

@LeoQuote update to python 2.7.15: 2019-02-03 00:54:28.316443 Traceback (most recent call last): File "./redis-monitor.py", line 206, in run used_memory, peak_memory) File "/home/redis/redis-3.2.6/redislive/nkrode-RedisLive-e1d7763/src/dataprovider/redisprovider.py", line 30, in save_memory_info self.conn.zadd(server + ":memory", str(timeutils.convert_to_epoch(timestamp)), data) File "/usr/local/python2.7.15/lib/python2.7/site-packages/redis/client.py", line 2320, in zadd for pair in iteritems(mapping): File "/usr/local/python2.7.15/lib/python2.7/site-packages/redis/_compat.py", line 94, in iteritems return x.iteritems() AttributeError: 'str' object has no attribute 'iteritems'

==============================

nonomal commented 5 years ago

@java-new-bird Have you solved it?

nonomal commented 5 years ago

https://github.com/nkrode/RedisLive/issues/103

pgm-rookie commented 5 years ago

@java-new-bird Have you solved it?

yes ,solved with LeoQuote‘s solution.