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

KeyError: 'SqliteStatsStore' #51

Closed pavel-hladik closed 11 years ago

pavel-hladik commented 11 years ago

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?

kumarnitin commented 11 years ago

Add SqliteStatsStore property in your config.

Aaronlong31 commented 11 years ago

I'm a newbie and I have the same problem. Can you show me a example config? Thank you!

pavel-hladik commented 11 years ago

You have to change your redis-live.conf :

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

    "DataStoreType" : "sqlite",

    "SqliteStatsStore":
    {
    }
}
Aaronlong31 commented 11 years ago

Thank you , it works!