[Spce-user] How to clean up InfluxDB in Sipwise CE

Guillem Jover gjover at sipwise.com
Fri Feb 22 19:48:02 EST 2019


Hi!

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:

  ,---
  duration=8w
  for db in ngcp telegraf; do
    influx -execute \
      "ALTER RETENTION POLICY autogen ON $db DURATION $duration"
  done
  `---

Take into account it might take some time until influxdb enforces that
policy, the default is 30 minute intervals.

Thanks,
Guillem



More information about the Spce-user mailing list