by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Guy Korland
    @gkorland
    great! if you see issues with docs please do share and we'll try to clarify
    Milos
    @mrkisha_gitlab
    Here is the wording from docs retentionTime - Maximum age for samples compared to last event time (in milliseconds). It should be more explicit like this retentionTime - Maximum age of samples to be retained compared to this (last) event time (in milliseconds). And samples wont be deleted before new Sample with retention is added to TS.
    Milos
    @mrkisha_gitlab
    Is there a way to fetch latest 10 samples? COUNT in MRANGE gives the last 10 samples.
    Guy Korland
    @gkorland
    we plan to add this feature in the next version
    we consider adding MREVRANGE and REVRAGNE
    Milos
    @mrkisha_gitlab
    Sounds good. Do you have any time-frame when it will be released?
    Guy Korland
    @gkorland
    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
    @gkorland
    ashreid23
    @ashreid23

    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 = '127.0.0.1', 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)
    ashreid23
    @ashreid23
    is it possible to have dictionarys as values at all, or do they need to be integers?
    Guy Korland
    @gkorland
    RedisTimeSeries supports only numeric values
    ashreid23
    @ashreid23
    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
    @gkorland
    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?
    ashreid23
    @ashreid23
    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 = '127.0.0.1', 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.
    ashreid23
    @ashreid23
    excuse the long messages, I hope this is the right forum / will be of interest to others
    Anand Kumar
    @lemonnn-8
    Hello everyone, I had a doubt regarding RedisTS with .NET which is can I add 2 labels while creating a timeseries. if yes, how?
    DvirDukhan
    @DvirDukhan

    already answered in PM, but for the general knowledge:
    https://github.com/RedisTimeSeries/NRedisTimeSeries/blob/master/NRedisTimeSeries.Example/CreateExample.cs
    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);
                redis.Close();
            }

    labels is a list the can contain many TimeSeriesLabel values

    ashreid23
    @ashreid23

    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? :)

    ashreid23
    @ashreid23
    ok.. so /readies/bin/getpy2 is not on the master branch
    ashreid23
    @ashreid23
    which i assume means the builder cannot get to it?
    Guy Korland
    @gkorland
    on which OS are you running, and how did you try to build the docker?
    Rafi Einstein
    @rafie
    Let's see if submodules are in place. Did we do git submodule update --init --recursive? Is directory ./deps/readies empty?
    ashreid23
    @ashreid23
    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
    @itamarhaber

    @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/redistimeseries.so 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
    ashreid23
    @ashreid23
    @itamarhaber ha, just had a little moment trying to figure out what /path/to/redistimeseries.so is.. as obvious at that is in hindsight .. thankyou thankyou thankyou
    Itamar Haber
    @itamarhaber
    :+1: