TSREM key timestamp [timestamp ...]
This command removes one or more specified timestamps from the time series that is associated with the given key.

  • If the key exists, but is not of time series type, an error is raised.
  • If the given timestamp is not a valid signed 64 bit integer, an error is raised.
  • If the provided timestamps don’t exist, TSRem still returns “OK”. As a result, TSRem just ensures the provided timestamps no longer exist, but doesn’t provide any information about whether they existed before the command was run.

    Returns the appropriate status string.


    The timestamp can be arbitrary integers used just for sorting values in a certain order.

    $ TSAdd cpu_usage 10 “70”
    $ TSAdd cpu_usage 20 “80” 30 “60” 40 “90”

    We could also encode the timestamp as “yyyymmddhhmm”, since this would still produce integers that are sortable by the actual timestamp.

    $ TSAdd cpu_usage 201710311100 “50”

    A more common option would be to specify the timestamp as the unix timestamp

    $ TSAdd cpu_usage 1509474505 “75”
    $ TSRem cpu_usage 20 30 40
    $ TSRangeByTime cpu_usage 10 40
    1) 10 
    2) “70"
    $ TSRem cpu_usage 1509474505
    $ TSGet cpu_usage 1509474505


    tsadd, tsget, tsrangebytime