*Recreating the Ceilometer DB seems extreme to clean up data.
*I believe TTL will only delete old records from this point on not historical records.
Log in and see if the TTL modification actually decreased the size with the following commands.
mongo -u ceilometer -p {PASSWORD} ceilometer
show collections;
db.stats()
db.meter.stats()
db.resource.stats()
db.meter.getIndexes()
db.resource.getIndexes()
To configure TTL you’ll need to:
update Ceilometer config on every controller node “/etc/ceilometer/ceilometer.conf” and
set the “time_to_live” parameter to “86400” (1 day). or whatever period is suitable.
Next step you need is to setup cron job for ceilometer-expirer script:
run “crontab -e” in CLI, paste
0 0 * * * ceilometer-expirer --config-file /etc/ceilometer/ceilometer.conf
and save.
Then restart ceilometer-collector service on all controller nodes:
You can also manually remove a meter post a certain date with this command
db.meter.remove({"timestamp":{"$lt":ISODate("2015-03-31T19:00:40")}})
↧