How to easily delete ranges of data?

Hi there,

It seems like the best way to do this would be to set up an appropriate retention policy to drop data once it’s no longer useful, and in the meantime, set up a continuous query or run a Kapacitor TICKscript to maintain the data you do want to keep (in the 09h00PM → 11H00PM time range).

You can read about retention policies here.
You can read about continuous queries here.
You can read about getting started with Kapacitor here.

If you need to delete the data manually, you’ll need to first set up a continuous query to save your specified time range of data, and then you can drop whole series manually, using:

DELETE FROM <measurement_name> WHERE [<tag_key>='<tag_value>'] | [<time interval>]

For more information on deleting series, please see this documentation.

Good luck!

1 Like