nkrode/RedisLive

KeyError: 'SqliteStatsStore'

pavel-hladik opened this issue · 4 comments

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?

Add SqliteStatsStore property in your config.

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

You have to change your redis-live.conf :

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

    "DataStoreType" : "sqlite",

    "SqliteStatsStore":
    {
    }
}

Thank you , it works!