Giter Site home page Giter Site logo

nkrode / redislive Goto Github PK

View Code? Open in Web Editor NEW
3.1K 3.1K 646.0 2.93 MB

Visualize your redis instances, analyze query patterns and spikes.

Home Page: http://www.nkrode.com/article/real-time-dashboard-for-redis

License: MIT License

Python 38.12% JavaScript 51.60% HTML 10.27%

redislive's Introduction

RedisLive

original project and loading address: https://github.com/nkrode/RedisLive

Visualize your redis instances, analyze query patterns and spikes.

Redis Live

Setup Instructions

Installation

Install Dependencies

You'll also need argparse if you're running Python < 2.7:

Get RedisLive

Configuration

  • edit redis-live.conf :
  • update the value of the key RedisServers to the redis instances you want to monitor. You can monitor multiple instances by appending more values to the RedisServers list.
  • update the value of the key RedisStatsServer to the redis instance you will use to store RedisLive data (this redis instance is different from the redis instances you are monitoring).
  • passwords can be added as an optional parameter for any redis instance

if you don't have a spare redis instance to use to store Redis Live data, then you can configure to use sqlite by changing "DataStoreType" : "sqlite"

Start RedisLive

  • start the monitoring script ./redis-monitor.py --duration=120 duration is in seconds (see caveat)
  • start the webserver ./redis-live.py
  • RedisLive is now running @ http://localhost:8888/index.html

Caveat on monitoring redis

Currently the only hook into monitoring a redis instance is Redis MONITOR command, which streams back every command processed and reduces the throughput of the redis instance. It is recommended to run redis-monitor with --duration suitable for your redis deployment and scheduling it to run periodically as a cron job.

Authors

Nitin Kumar

Contributors

License

RedisLive is released under the MIT license:

redislive's People

Contributors

ahammond avatar allanparsons avatar beastpu avatar bialecki avatar hippasus avatar ilongyuan avatar jimchen1009 avatar josegonzalez avatar kisabaka avatar krig avatar kumarnitin avatar leto avatar markdube avatar nkrode avatar pemontto avatar skreuzer avatar splee avatar wrongfan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

redislive's Issues

Reliance on MONITOR command

RedisLive looks fantastic, I'd really like to give it a try, however:

Due to the performance penalty of using the MONITOR command, I'd be reluctant to use RedisLive in high-load environments. I've had a very quick look and it seems the MONITOR command is used to generate the breakdown of command usage stats, sampled at the time of MONITOR running.

Redis 2.6 now has built-in command stats in INFO commandstats. See http://redis.io/commands/info. Is it possible to remove the need to use the MONITOR command now that the stats are available in INFO? Is there anything else MONITOR is being used for?

No realtime data

I can see last 15 min, last 1 hour, etc. But realtime data is always empty, the monitor crontab item set as follows。
*/5 * * * * cd /RedisLive/src && ./redis-monitor.py --duration=60 >>/tmp/cron.log 2>&1

image
image

New Widget : Top Pefixes

Source for Stats : Same as Top Keys widget, just extract the Prefix from the key (anything before : ), example Customer:1203, prefix is Customer.

Chart Type : Column Chart or Bar Chart

This widget can be modelled entirely on the Top Keys widget, data storing, querying will be exactly the same.

got "no such table: monitor" when i view page url with config "DataStoreType" as "sqlite"

i config the "DataStoreType" as "sqlite", and got "no such table: monitor" error when view the page url.

redis-live.conf:
"DataStoreType" : "sqlite",

"SqliteStatsStore" :
{
    "path":  "D:/performance/api.product/redisCache/redis.sqlite"
}

error info:
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\tornado\web.py", line 1141, in _when_c
omplete
callback()
File "C:\Python27\lib\site-packages\tornado\web.py", line 1162, in _execut
e_method
self._when_complete(method(_self.path_args, *_self.path_kwargs),
File "D:\Program Files\RedisLive\src\api\controller\TopKeysController.py",
line 25, in get
for data in self.stats_provider.get_top_keys_stats(server, start, end):
File "D:\Program Files\RedisLive\src\dataprovider\sqliteprovider.py", line
178, in get_top_keys_stats
return [[r[0], r[1]] for r in c.execute(query, values)]
OperationalError: no such table: monitor
[E 131223 11:53:32 web:1635] 500 GET /api/topkeys?from=&to=&server=10.255.254.29
%3A6379 (127.0.0.1) 0.00ms

is there need to init the sqlite db first? thanks!

Exception throw while shutting down

This doesn't happen all the time (only once or twice), but I believe it was working on shutting itself down automatically when this was thrown.

$ ./redis-monitor.py --duration=120
shutting down...
Exception in thread Thread-5 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
  File "./redis-monitor.py", line 96, in run
  File "/home/ubuntu/RedisLive/src/dataprovider/redisprovider.py", line 69, in SaveMonitorCommand
  File "build/bdist.linux-x86_64/egg/redis/client.py", line 1532, in execute
  File "build/bdist.linux-x86_64/egg/redis/client.py", line 1389, in reset
  File "build/bdist.linux-x86_64/egg/redis/connection.py", line 354, in release
  File "build/bdist.linux-x86_64/egg/redis/connection.py", line 331, in _checkpid
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'getpid'

Error displayed with multiple redis instance

I tried that and am getting the following error when starting redis-live.conf:

RedisLive]# ./redis-live.py

Traceback (most recent call last):

File "./redis-live.py", line 10, in

from api.controller.ServerListController import ServerListController

File "/etc/RedisLive/api/controller/ServerListController.py", line 1, in

from BaseController import BaseController

File "/etc/RedisLive/api/controller/BaseController.py", line 7, in

class BaseController(tornado.web.RequestHandler):

File "/etc/RedisLive/api/controller/BaseController.py", line 9, in BaseController

stats_provider = RedisLiveDataProvider.get_provider()

File "/etc/RedisLive/dataprovider/dataprovider.py", line 16, in get_provider

data_store_type = settings.get_data_store_type()

File "/etc/RedisLive/api/util/settings.py", line 18, in get_data_store_type

config = get_settings()

File "/etc/RedisLive/api/util/settings.py", line 7, in get_settings

return json.load(open("redis-live.conf"))

File "/usr/lib64/python2.6/json/init.py", line 267, in load

parse_constant=parse_constant, **kw)

File "/usr/lib64/python2.6/json/init.py", line 307, in loads

return _default_decoder.decode(s)

File "/usr/lib64/python2.6/json/decoder.py", line 319, in decode

obj, end = self.raw_decode(s, idx=_w(s, 0).end())

File "/usr/lib64/python2.6/json/decoder.py", line 336, in raw_decode

obj, end = self._scanner.iterscan(s, **kw).next()

File "/usr/lib64/python2.6/json/scanner.py", line 55, in iterscan

rval, next_pos = action(m, context)

File "/usr/lib64/python2.6/json/decoder.py", line 183, in JSONObject

value, end = iterscan(s, idx=end, context=context).next()

File "/usr/lib64/python2.6/json/scanner.py", line 55, in iterscan

rval, next_pos = action(m, context)

File "/usr/lib64/python2.6/json/decoder.py", line 219, in JSONArray

raise ValueError(errmsg("Expecting object", s, end))

ValueError: Expecting object: line 28 column 2 (char 692)

New Widget : Command Frequencies

Create a new widget to show individual command frequencies ( # of operations per second). This is slightly different from Top Commands Widget, which shows the aggregate count of individual commands.

Sample Output:
GET 23 operations / second
SET 1892 operations / second
HGET 12 operations / second
ZINCRBY 783 operations / second
ZRANGEBYSCORE 99 operations / second

Source for Stats : Similar to Top Commands Widget

Chart Type : Table

two bugs found in redislive

First one is in sqliteprovider.py at line 122:
query_time_fmt = '%Y-m-%d' miss a '%'

another is in base-widget-view.js at line 42&43:
from : this.$el.find('[name=from]').val() || new Date(new Date() - 7_24_60_60000)
, to : this.$el.find('[name=to]').val() || new Date()
in non-English environments, new Date() may produce a date containing non-English words, thus python cannot recognize it during parsing. For example, in China it produces "Fri Jan 23 2015 17:30:14 GMT+0800 (**标准时间)".
I modified the statements to:
from : this.$el.find('[name=from]').val() || this.ISODateString(new Date(new Date() - 7_24_60_60000))
, to : this.$el.find('[name=to]').val() || this.ISODateString(new Date())
It seems work then.

ConnectionError: Error while reading from socket: ('Connection closed by server.',)

redis-monitor.py throw exception after run in some minutes

Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "./redis-monitor.py", line 103, in run
for command in commands:
File "./redis-monitor.py", line 59, in listen
yield self.parse_response()
File "./redis-monitor.py", line 53, in parse_response
return self.connection.read_response()
File "/usr/local/lib/python2.7/dist-packages/redis/connection.py", line 569, in read_response
response = self._parser.read_response()
File "/usr/local/lib/python2.7/dist-packages/redis/connection.py", line 224, in read_response
response = self._buffer.readline()
File "/usr/local/lib/python2.7/dist-packages/redis/connection.py", line 162, in readline
self._read_from_socket()
File "/usr/local/lib/python2.7/dist-packages/redis/connection.py", line 137, in _read_from_socket
(e.args,))
ConnectionError: Error while reading from socket: ('Connection closed by server.',)

RedisStatsServer?

Very nice application. But where do I get RedisStatsServer? Everything is working, except that bit.

Dashboard "Top Keys" shows Redis password

Hi,

I created a password-protected local Redis instance that I want to monitor. Then I created a second local Redis instance for RedisLive. I logged in the first Redis instance using redis-cli and authentified using AUTH <my password>. Then in the RedisLive dashboard, my password appeared in plain text in Top Keys and the AUTH command in Top Commands. Is this the expected behavior? How can I avoid this?

This is the redis.conf of the first Redis instance. I used the default parameters except for the following:

pidfile /Users/me/work/redis/run/redis.pid
port 6380
loglevel debug
logfile stdout
#%(save)s
dbfilename dump.rdb
dir /Users/me/work/redis/data
requirepass foobared

This is the redis.conf of the second Redis instance for RedisLive:

pidfile /Users/me/progs/RedisLive/run/redis.pid
port 6399
loglevel debug
logfile stdout
#%(save)s
dbfilename dump.rdb
dir /Users/me/progs/RedisLive/data

I am using Python 2.7 and redis 2.9.1 (both from Anaconda). I use the latest version of RedisLive (cloned from github yesterday)

Can not see any charts on the web page

I installed RedisLive-22e7051 and RedisLive-master, and encountered the same problem, the steps is as follows:

  1. Modified the redis-live.conf as follows:
    {
    "RedisServers":
    [
    {
    "server": "192.168.15.46",
    "port" : 6379
    },
    {
    "server": "192.168.15.46",
    "port" : 6380
    }
    ],
    "DataStoreType" : "sqlite",
    "RedisStatsServer":
    {
    "server" : "ec2-184-72-166-144.compute-1.a...",
    "port" : 6385
    },
    "SqliteStatsStore" :
    {
    "path": "/opt/redis-stat.sqlite"
    }
    }
  2. Added a timer task as follows via crontab:
    */1 * * * * cd /opt/nkrode-RedisLive-22e7051/src; ./redis-monitor.py --duration=15
  3. Viewed the '/var/spool/mail/root' , the timer task seems okay.
  4. Viewed the file '/opt/redis-stat.sqlite', its size is always zero.
  5. Can not see any charts as the attached image on the web page
    2
  6. If setting "DataStoreType" as "redis", will encounter the issue described '#63'.

Getting error while starting RedisLive( ./redis-montior.py )

2014-04-01 15:26:01.685543
Traceback (most recent call last):
File "./redis-monitor.py", line 205, in run
stats_provider.save_memory_info(self.id, current_time, used_memory, peak_memory)
File "/home/ravi/RedisLive/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/lib/python2.7/dist-packages/redis/client.py", line 1345, in zadd
return self.execute_command('ZADD', name, _pieces)
File "/usr/local/lib/python2.7/dist-packages/redis/client.py", line 464, in execute_command
connection.send_command(_args)
File "/usr/local/lib/python2.7/dist-packages/redis/connection.py", line 334, in send_command
self.send_packed_command(self.pack_command(*args))
File "/usr/local/lib/python2.7/dist-packages/redis/connection.py", line 316, in send_packed_command
self.connect()
File "/usr/local/lib/python2.7/dist-packages/redis/connection.py", line 253, in connect
raise ConnectionError(self._error_message(e))
ConnectionError: Error 111 connecting 127.0.0.1:6385. Connection refused.

I am getting the above error while starting RedisLive.

sudo ./redis-monitor.py --duration=120

port to cyclone.io

Not an issue but I don't know if there is something that would interest you by doing this. I've used RedisLive to show how to port an app from tornado to cyclone http://chu.pe/1LN

I've yet to finish the agent but I've figured out that for what I wanted to do this is enough - it would be an exercise on deferreds and tasks to use less CPU. If you get interested let me know. I've forked but didn't send any pull request as it would change too much of the app and might not be related to your plan.

Thanks for sharing

Use YAML for redis-live.conf

YAML is easier for humans to read/write while having an almost identical interface as the json module. Writing JSON manually is painful :)

redis-monitor crashes when the "password" key isn't set in config

When a server doesn't need a password but the config for it doesn't have "password" : "some-password", redis-monitor will crash with a KeyError:

Traceback (most recent call last):
  File "./redis-monitor.py", line 300, in <module>
    monitor.run(duration)
  File "./redis-monitor.py", line 252, in run
    if redis_server["password"]:
KeyError: 'password'

Page refresh stops

Someone else mentioned this here - http://www.nkrode.com/article/real-time-dashboard-for-redis - given I've also encountered it I was hoping to help sort it out.
Oddly enough if I am connected to the server running this, via ssh, my connection gets terminated so I think that might be related. Could it be possible that the browser connection is being dropped by redis-live.py?

I redirected the output from redis-live.py and can see this break in the log file that is being generated;
[I 130309 18:48:12 web:1462] 200 GET /api/memory?from=&to=&server=172.16.1.100%3A6379 (192.168.126.25) 1.52ms
[I 130309 18:48:12 web:1462] 200 GET /api/topcommands?from=&to=&server=172.16.1.100%3A6379 (192.168.126.25) 0.85ms
[I 130309 18:48:13 web:1462] 200 GET /api/topkeys?from=&to=&server=172.16.1.100%3A6379 (192.168.126.25) 1.13ms
[I 130309 18:48:13 web:1462] 200 GET /api/commands?from=&to=&server=172.16.1.100%3A6379 (192.168.126.25) 3.91ms
[I 130309 18:48:13 web:1462] 200 GET /api/memory?from=&to=&server=172.16.1.100%3A6379 (192.168.126.25) 1.44ms
[I 130309 18:48:13 web:1462] 200 GET /api/topcommands?from=&to=&server=172.16.1.100%3A6379 (192.168.126.25) 0.86ms
[I 130309 18:56:03 web:1462] 304 GET /index.html (192.168.126.25) 0.48ms
[I 130309 18:56:03 web:1462] 304 GET /js/libs/bootstrap/bootstrap.css (192.168.126.25) 0.28ms
[I 130309 18:56:03 web:1462] 304 GET /js/libs/jquery/jquery-1.7.2.min.js (192.168.126.25) 0.27ms
[I 130309 18:56:03 web:1462] 304 GET /js/libs/less/less-1.3.0.min.js (192.168.126.25) 0.70ms
[I 130309 18:56:03 web:1462] 304 GET /js/libs/bootstrap/js/bootstrap-button.js (192.168.126.25) 0.26ms

You can see it stops at 18:48:13, then restarts when I do a manual page refresh.

This is python 2.7.3, running on Ubuntu 12.04 with redis 2.2.12. I did edit redis-monitor.py to set time.sleep to 10, and then setup a cronjob to run it every minute for duration=60 (the system load isn't unbearable for the server), but even without this I get the same issue.

Let me know if there is some debugging I can enable or anything else I can provide that might help.

ImportError: No module named dataprovider.dataprovider

Every time I try to launch the monitor, I get the following error:

Traceback (most recent call last):
File "./redis-monitor.py", line 13, in
from dataprovider.dataprovider import RedisLiveDataProvider
ImportError: No module named dataprovider.dataprovider

Something seems missing, but I cannot figure out what.

I installed all missing dependencies via the package manager, so maybe that is my issue. Here are the commands I used on a fresh Ubuntu install:

sudo apt-get install python-pip python-dev build-essential
sudo pip install --upgrade pip
sudo pip install --upgrade virtualenv
sudo pip install tornado
sudo pip install redis
sudo pip install python-dateutil
git clone https://github.com/kumarnitin/RedisLive.git
./redis-monitor.py --duration=120

Using:
Ubuntu 12.04 LTS
Python 2.7.3
Redis: 2.4.14

Here are my packages installed with pip:

Warning: cannot find svn location for distribute==0.6.24dev-r0
GnuPGInterface==0.3.2
Landscape-Client==12.04.2
PAM==0.4.2
Twisted-Core==11.1.0
apt-xapian-index==0.44
argparse==1.2.1
chardet==2.0.1
command-not-found==0.2.44

FIXME: could not find svn URL in dependency_links for this package:

distribute==0.6.24dev-r0
httplib2==0.7.2
keyring==0.7.1
language-selector==0.1
launchpadlib==1.9.12
lazr.restfulclient==0.12.0
lazr.uri==1.0.3
oauth==1.0.1
pyOpenSSL==0.12
pycrypto==2.4.1
pyserial==2.5
python-apt==0.8.3ubuntu7
python-dateutil==2.1
python-debian==0.1.21ubuntu1
redis==2.4.13
simplejson==2.3.2
six==1.1.0
tornado==2.3
ufw==0.31.1-1
virtualenv==1.7.1.2
wadllib==1.3.0
wsgiref==0.1.2
zope.interface==3.6.1

Thanks! Let me know if you need more info!

Required python-dateutil module

When I first tried to run the webserver it threw an ImportError like below:

Traceback (most recent call last):
File "./redis-live.py", line 8, in
from api.controller.ServerListController import ServerListController
File "/Users/mnbbrown/Development/redislive/src/api/controller/ServerListController.py", line 5, in
from BaseController import BaseController
File "/Users/mnbbrown/Development/redislive/src/api/controller/BaseController.py", line 5, in
import dateutil.parser
ImportError: No module named dateutil.parser

Installing python-dateutil (pip install python-dateutil) seemed to fix the problem.
Is it meant to be a dependency?

Alerts and notifications

Support sending alerts and notifications to the administrator when certain condition is met.

For example :

  • memory usage goes over a certain thresholds
  • sudden spike in memory usage
  • redis instance goes down

Using the web UI, provide a settings overlay to manage alerts.

Caught "OperationalError: database is locked"

Traceback is:

File "E:\RedisLive\src\redis-monitor.py", line 136, in run
statsProvider.SaveMemoryInfo(self.id, currentTime, used_memory, peak_memory)

File "E:\RedisLive\src\dataprovider\sqliteprovider.py", line 14, in SaveMemory
Info
c.execute("INSERT INTO memory VALUES ('" + timestamp.strftime('%Y-%m-%d %H:
%M:%S') + "'," + str(used) + "," + str(peak) + ",'" + server + "')")
OperationalError: database is locked

I followed what ReadMe taught, and got this error. Does this suggest that I should installed some sqlite db? thx

update: btw, my redis version is 2.2.2.

Getting redisInfo['used_memory_peak'] KeyError

Followed the instructions in the Readme, got this error constantly as a response from the monitor. Will keep digging into it.

Traceback (most recent call last):
  File "./redis-monitor.py", line 134, in run
    peak_memory = int(redisInfo['used_memory_peak'])
KeyError: 'used_memory_peak'

KeyError: 'SqliteStatsStore'

Hi, I'm running latest CentOS 6.4 packages, Python 2.6 but with argparse. When I wanted to run command ./redis-monitor.py --duration=120 I got this message:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib64/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "./redis-monitor.py", line 97, in run
    stats_provider = RedisLiveDataProvider.get_provider()
  File "/opt/RedisLive/src/dataprovider/dataprovider.py", line 22, in get_provider
    return sqliteprovider.RedisStatsProvider()
  File "/opt/RedisLive/src/dataprovider/sqliteprovider.py", line 11, in __init__
    stats = settings.get_sqlite_stats_store()
  File "/opt/RedisLive/src/api/util/settings.py", line 28, in get_sqlite_stats_store
    return config["SqliteStatsStore"]
KeyError: 'SqliteStatsStore'

Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib64/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "./redis-monitor.py", line 188, in run
    stats_provider = RedisLiveDataProvider.get_provider()
  File "/opt/RedisLive/src/dataprovider/dataprovider.py", line 22, in get_provider
    return sqliteprovider.RedisStatsProvider()
  File "/opt/RedisLive/src/dataprovider/sqliteprovider.py", line 11, in __init__
    stats = settings.get_sqlite_stats_store()
  File "/opt/RedisLive/src/api/util/settings.py", line 28, in get_sqlite_stats_store
    return config["SqliteStatsStore"]
KeyError: 'SqliteStatsStore'

Here is my redis-live.conf:

{
    "RedisServers":
    [ 
        {
          "server": "111.222.333.444",
          "password" : "SECRET",
          "port" : 6379
        }
    ],

    "DataStoreType" : "sqlite",

    "RedisStatsServer":
    {
        "server" : "127.0.0.1",
        "port" : 6381
    }   
}

Propably missing SqliteStatsStore config info in redis-live.conf?

API Error When Monitoring Redis Instances on Nonstandard Port

When I changed the dropdown to monitor multiple redis instances on the same server, nothing was happening, so I opened the Chrome dev console and got a 500 back at this URL:
http://localhost:8888/api/info?server=127.0.0.1%3A6380

http://localhost:8888/api/info?server=127.0.0.1%3A6379 returned valid JSON, which is the default port, but other ports return the following error:

Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 1021, in _execute
getattr(self, self.request.method.lower())(_args, *_kwargs)
File "/home/joe/RedisLive/src/api/controller/InfoController.py", line 32, in get
uptimeSeconds = redisInfo['uptime_in_seconds']
KeyError: 'uptime_in_seconds'

If it matters, I was using sqlite and have password authentication enabled. I'm not sure if sqllite is saving properly though. How can I verify this?

Can not refresh data when change servers

I choose different servers, sometimes the data will be refreshed, but most of the time the page did not change.

I fresh the page manually, and the I choose some other server, the page will be refreshed. After while, ti will not work again, unless I refresh manually again.

Config:
1、32 redis instances;
2、data store in redis
3、Chrome

Support a text only mode

In some environments, running a web based dashboard might not be ideal. To support them provide a python script to output widget results to a text file. Support command line arguments to define the start and end date.

monitor spitting out AttributeError

When I run ./redis-monitor.py --duration 120, I get this:

Traceback (most recent call last):
File "./redis-monitor.py", line 105, in run
parts = command.split(" ")
AttributeError: 'list' object has no attribute 'split'

403: Forbidden when trying to access to the webinterface.

Hi, the setup was easy but i can't access to the webinterface on my debian server (python 2.6.6)

this is what I get when I access

I never done any python.

  1. What did i do wrong in order to have this error message ?
  2. Is that possible to only bind the interface not only on a port, but on an alias too ? Because right now if i do : my-domain:8888 or my-client-domain i end up on the redis-live.

Thanks.
Some information below.

[W 121214 14:23:35 web:1077] 403 GET / ():  is not a file
[W 121214 14:23:35 web:1462] 403 GET / () 0.44ms
[W 121214 14:23:35 web:1462] 404 GET /favicon.ico () 0.24ms

Here's my config :

{
    "RedisServers":
    [
        {
          "server": "127.0.0.1",
          "port" : 6379
        }
    ],

    "DataStoreType" : "sqlite",

    "RedisStatsServer":
    {
        "server" : "127.0.0.1",
        "port" : 6381
    }
}

New Widget : Reads vs. Writes

Create a new widget to show # of reads vs writes. Helps answer questions like, are we primarily writing or reading from the cache?

Source for Stats : Tap into the commands pipeline and categorize the command into a read kind or write kind, for example GET is a read, SET is a write, ZRANGEBYSCORE is a read, SETBIT is a write. etc.

Chart Type : Pie Chart, showing the percentage of reads vs writes.

New Widget : Persists vs Expire keys

Create a new widget to support Persists vs expire keys:

  1. Source for Stats : INFO command gives information about # of keys that are expiring vs persisting.
  2. Chart Type : Pie Chart
  • there is already some plumbing done in redis-monitor.py to capture this info, it's currently commented out.

Graphs show no data

I am running a redis live instance on the same machine where redis is running. I am able to see the stats but I don't see any graphs. Also, triggered redis-monitor.py which is setup as an hourly cron.

Screenshot: http://s24.postimg.org/6ux9mm98k/Screenshot_from_2013_04_03_17_10_06.jpg

Any suggestions about what is going on?

redis-live.conf

{
        "RedisServers":
        [
                {
                  "server": "127.0.0.1",
                  "port" : 8080
                }
        ],

        "DataStoreType" : "sqlite",

        "RedisStatsServer":
        {
                "server" : "127.0.0.1",
                "port" : 6381
        }
}

Thanks,
-Utkarsh

AttributeError on timedelta

I'm using python2.6

ERROR:root:Uncaught exception GET /api/commands?from=&to=&server=127.0.0.1%3A6379 (63.245.220.240)
HTTPRequest(protocol='http', host='www.peterbe.com:8888', method='GET', uri='/api/commands?from=&to=&server=127.0.0.1%3A6379', version='HTTP/1.1', remote_ip='63.245.220.240', body='', headers={'Accept-Language': 'en-us,en;q=0.5', 'Accept-Encoding': 'gzip, deflate', 'Host': 'www.peterbe.com:8888', 'Accept': 'application/json, text/javascript, */*; q=0.01', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:14.0) Gecko/20120601 Firefox/14.0a2', 'Connection': 'keep-alive',...
7fdc9ef856'})
Traceback (most recent call last):
  File "/root/RedisLive/virtualenv/lib/python2.6/site-packages/tornado/web.py", line 1021, in _execute
    getattr(self, self.request.method.lower())(*args, **kwargs)
  File "/root/RedisLive/src/api/controller/CommandsController.py", line 32, in get
    minutes = difference.total_seconds() / 60
AttributeError: 'datetime.timedelta' object has no attribute 'total_seconds'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.