i made 2 metrices in opentsdb test purpose using command:
./build/tsdb mkmetric temperatures ./build/tsdb mkmetric meterreadings i entered datapoints in these metrices using java:
put temperatures 1356998400 23.5 room=bedroom floor=1\n put meterreading 1430568000 32800 accumulationbehaviour=4 commodity=1 dataqualifier=12 defaultquality=0 flowdirection=1 intervallength=900 intervallength=900 kind=12 phase=769 poweroftenmultiplier=0 timeattribute=0 uom=72 put meterreading 1430568900 33624 accumulationbehaviour=4 commodity=1 dataqualifier=12 defaultquality=0 flowdirection=1 intervallength=900 intervallength=900 kind=12 phase=769 poweroftenmultiplier=0 timeattribute=0 uom=72 put meterreading 1430569800 35192 accumulationbehaviour=4 commodity=1 dataqualifier=12 defaultquality=0 flowdirection=1 intervallength=900 intervallength=900 kind=12 phase=769 poweroftenmultiplier=0 timeattribute=0 uom=72 put meterreading 1430570700 37928 accumulationbehaviour=4 commodity=1 dataqualifier=12 defaultquality=0 flowdirection=1 intervallength=900 intervallength=900 kind=12 phase=769 poweroftenmultiplier=0 timeattribute=0 uom=72 now want delete data , metrices, opentsdb behave fresh installation.
in documentation mention using scan command, not sure how use command.
it well-written in opentsdb website. also, have google group has written answer it.
syntax:
scan [--delete|--import] start-date [end-date] query [queries...]
examples:
tsdb scan --delete 1970/01/01-00:00:00 sum temperatures
tsdb scan --delete 1970/01/01-00:00:00 sum meterreadings
if want specify zookepeer: tsdb scan --delete --zkquorum localhost 1970/01/01 min temperatures this delete data stored in tsdb table. think doesn't delete entry tsdb-uid table. can rename metric name new name.
`tsdb uid rename metrics old.name new.name`
Comments
Post a Comment