[Spce-user] How to clean up InfluxDB in Sipwise CE
gjover at sipwise.com
Fri Feb 22 19:48:02 EST 2019
On Fri, 2019-02-08 at 14:48:55 -0600, Tung Tran wrote:
> My sipwise's hard disk is almost full and the /var/lib/influxdb/data took
> over 10G
> Do you know how to clean up the old data?
Right, this was something pending doing, but slipped through the
cracks. I've prepared a fix to add explicit configurable retention
policies for the influxdb databases.
You can add those to your instance right away with something like
the following, for say an 8 week retention policy:
for db in ngcp telegraf; do
influx -execute \
"ALTER RETENTION POLICY autogen ON $db DURATION $duration"
Take into account it might take some time until influxdb enforces that
policy, the default is 30 minute intervals.
More information about the Spce-user