delete all data in interval ?

38 views
Skip to first unread message

Adrian Sandu

unread,
Mar 25, 2017, 3:34:12 AM3/25/17
to OpenTSDB
Hey peeps,

So, a power outage went by and for some reason my network metrics ( maybe others too ) got a spike of "-850Gb/s" or something similar when it got back. Everything went back to normal after that.
I am wondering if there is an easy way to delete all the data in an interval yyyy/m/d-hh:mm:ss to yyyy/m/d-hh:mm+20:ss ? ( I can specify the interval, no need for it to be interpreted ).
Or should I dump a list of metrics ( need to figure that one out ) and go through them one by one and delete data between dates ?
tsdb uid grep . | awk '/metrics/ {print $2}' | awk -F ':' '{print $1}'

It seems that tsdb scan doesn't support regexes. The following yells an exception.
tsdb scan 2017/03/23-09:25:00 2017/03/23-09:52:00 sum '.*'

Thanks in advance.

ManOLamancha

unread,
Apr 25, 2017, 4:39:57 PM4/25/17
to OpenTSDB
You can delete via the HTTP query interface as of 2.3 by passing in a flag. That will do what you want (but deletes data for an entire row, just remember). 
Reply all
Reply to author
Forward
0 new messages