Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
    Guy Korland
    we consider adding MREVRANGE and REVRAGNE
    Sounds good. Do you have any time-frame when it will be released?
    Guy Korland
    we plan to release 1.2 in the next 2 weeks or so. And right after we'll start working on 1.4 so unless we decide to squeeze them to 1.2 in the last minute, I'll guess you'll see on master in the next 4 weeks.
    Guy Korland

    Hi I have a quick question regarding a problem I am having recording a timeseries of a python dictionary. I have a whole structure of keys and values and sub-key values etc.. I am trying to record everytime one of the values changes. (standard stuff). I am raising:

    redis.exceptions.ResponseError: TSDB: invalid value

    I am wondering if that is because my dictionary's keys are strings(as opposed to numeric) or if there is a size limit? or some other issue..

    conn_db_2 = Client(host = '', port = '6379', db=2)
    json_SIDdict =  json.dumps(SIDdict[SID], indent=4, sort_keys=True, default=str)
    conn_db_2.add(SID, int(round(time.time() * 10000)),json_SIDdict)
    is it possible to have dictionarys as values at all, or do they need to be integers?
    Guy Korland
    RedisTimeSeries supports only numeric values
    Thanks for the response, I found that out the hard way with more late night finagling/reading.
    As a way around this I am looking at having a diffent db for each value sub key/value. I think should be doable just quite verbose as solution. Should be around 30 db? (I have changed the redis.conf to allow this)
    I was wondering if anyone can see some potential issues i might encounter, has done something simmilar, or maybe has a different solution for this problem?
    I am wondering if there will be latency issues with trying to Query a range on 30 db at ‘the same’ time?
    Guy Korland
    what do you mean by 30DBs? can't you just use 30 keys?
    what are the json_SIDdict? are these static labels of the timeseries?
    json_SIDdict is the varable name json.dump() of the dictionary instance that is being updated. Json dump because of how I have learned to store dictionary's with ‘regular’ redis. (This is my third day using redis however, so I might be missing something there).
    I currently have around 3030 instance's each with up to 30 key value pairs I wish to make timeseries anylasis from.
    Where I am now is with db1 and 2 with 3030 keys of static data stored as json,
    I then have db 3 - 33 each with 3030 keys each containing 1 value that historically has been contained within the dictionary structure.
    In my script I have clients set up using the naming convention that was in my origional dictionary for example..
    bl_bin_ts = Client(host = '', port = '6379', db=19)
    and then..
    bl_bin_ts.add(SID, timenow ,SIDdict[SID]['bl_bin’])
    for example.
    This is in the context of recording data in real time from an API. I will then have a script running in parralel to make observations showing, lets say, the last 10 seconds, 30 seconds and 1 min 5 min.. etc.
    excuse the long messages, I hope this is the right forum / will be of interest to others
    Anand Kumar
    Hello everyone, I had a doubt regarding RedisTS with .NET which is can I add 2 labels while creating a timeseries. if yes, how?

    already answered in PM, but for the general knowledge:
    contains this example:

    /// <summary>
            /// Examples for creating time-series with parameters.
            /// The parameters retentionTime, uncompressed and labels are optional and can be set in any order when used as named argument.
            /// </summary>
            public static void ParameterizedCreate()
                ConnectionMultiplexer redis = ConnectionMultiplexer.Connect("localhost");
                IDatabase db = redis.GetDatabase();
                db.TimeSeriesCreate("retentionTime_ts", retentionTime: 5000);
                db.TimeSeriesCreate("uncompressed_ts", uncompressed: true);
                var label = new TimeSeriesLabel("key", "value");
                var labels = new List<TimeSeriesLabel> { label };
                db.TimeSeriesCreate("labeled_ts", labels: labels);
                db.TimeSeriesCreate("parameterized_ts", labels: labels, uncompressed: true, retentionTime: 5000);

    labels is a list the can contain many TimeSeriesLabel values


    Hi, I keep getting this error when trying to build a redistimeseries docker container using the example docker file from the RTS github.

    Step 8/19 : RUN ./deps/readies/bin/getpy2
     ---> Running in 314a52a5fc85
    /bin/sh: 1: ./deps/readies/bin/getpy2: not found
    ERROR: Service 'redis' failed to build: The command '/bin/sh -c ./deps/readies/bin/getpy2' returned a non-zero code: 127

    I have checked the cr/lf in notepad++ a (solution i have read elsewhere) and they all seem correct.
    The /readies/ path seems weird to me, so i tried redis.. but that didnt help.
    any ideas? :)

    ok.. so /readies/bin/getpy2 is not on the master branch
    which i assume means the builder cannot get to it?
    Guy Korland
    on which OS are you running, and how did you try to build the docker?
    Rafi Einstein
    Let's see if submodules are in place. Did we do git submodule update --init --recursive? Is directory ./deps/readies empty?
    win 10/docker desktop, i pulled the git repo and built using the example docker file. I looked thought the file structure and duplicated using files not included on the master branch, readies.. etc.. (redies was empty innitially)
    building the image using docker run -p 6379:6379 -it --rm redislabs/redistimeseries from the readme worked fine, and calling that image in a docker-compose worked fine also.
    my issue is that I am trying to use an existing dump.rdb witch has peramaters I need to set at initiation. so I need ,as i understand it currently, to be able to change the CMD ["redis-server",....... line to point to my .conf file. (or have access to it anyway.)
    Itamar Haber

    @ashreid23 you need to do the following:

    1. Any files you want the container to access need to be mounted (using the -v switch)
    2. For the rdb file, you'll want to mount it to in /data so use -v /path/to/your/file.rdb:/data/dump.rdb
    3. The conf file also needs to be mounted, e.g. -v /path/to/file.conf:/somewhere/myredis.conf
    4. Lastly, provide the /somewhere/myredis.conf as an argument to docker
    5. Make sure that your .conf file has the module /path/to/ directive as well

    So something like this should work:

    docker run -p 6379:6379 -it --rm -v /path/to/your/file.rdb:/data/dump.rdb -v /path/to/file.conf:/somewhere/myredis.conf  redislabs/redistimeseries /somewhere/myredis.conf
    @itamarhaber ha, just had a little moment trying to figure out what /path/to/ is.. as obvious at that is in hindsight .. thankyou thankyou thankyou
    Itamar Haber