-
Notifications
You must be signed in to change notification settings - Fork 5
Clearing data from your InfluxDB (v0.8.x) Instance
Right now (2015-11-16) we use v0.8.x of InfluxDB in the datasift-connector to store metrics for events such as interactions passing through the Connector. We've had a couple of users mention the size of their InfluxDB instance is growing beyond a couple of GB, which isn't really necessary considering the data stored is just metrics. While InfluxDB v0.9 seems to introduce max data size / TTL controls, we appear to be required to delete data manually from InfluxDB v0.8.x.
Below is an example DELETE statement which will clear all gauge data from your InfluxDB instance in the datasift-connector, apart from data recorded in the last hour
curl -G 'http://localhost:8086/db/datasift/series?u=root&p=root' --data-urlencode "q=DELETE FROM /^stats\.gauges..*$/ WHERE time < now() - 1h"
Obviously the timeframe can be edited as you like, changing now() - 1h
to now() - 1d
will delete everything apart from the data for the last day.
Note Deleting records from InfluxDB will temporarily increase disk usage due to the underlying DB service creating tombstone records. If you chose to delete records in this way, please ensure you have plenty of disk space.
References