How to clear ceilometer in OpenStack

To clean up old ceilometer data in OpenStack, perform the following steps:

  • First of all, stop the Telemetry service.

systemctl stop openstack-ceilometer-collector openstack-ceilometer-notification openstack-gnocchi-metricd openstack-gnocchi-statsd openstack-aodh-evaluator openstack-aodh-listener openstack-aodh-notifier openstack-ceilometer-central

  • Stop MongoDB service by entering the following on shell prompt.

systemctl stop mongod

  • Delete all files in /var/lib/mongodb and then restart MongoDB.

cd /var/lib/mongodb

rm -r *

  • Restart MongoDB.

systemctl start mongodb

  • Create a MongoDB master node.

mongo --host MONGOHOST --eval 'rs.initiate()'

  • Fing listener IP by entering the following command.

ss -tlnp|grep mongo

  • Add resulting IP to MongoDB replication file.

mongo --host MONGOHOST --eval 'rs.add("controler1_mongodb_IP:PORT"); rs.add("controler2_mongodb_IP:PORT"); '

  • Create a ceilometer database.

mongo --host MONGOHOST --eval 'db.getSiblingDB("ceilometer").addUser({user: "ceilometer", pwd: "MONGOPASS", roles: [ "readWrite", "dbAdmin" ]})'

  • Start Telemetry service using systemctl.

systemctl start openstack-ceilometer-collector openstack-ceilometer-notification openstack-gnocchi-metricd openstack-gnocchi-statsd openstack-aodh-evaluator openstack-aodh-listener openstack-aodh-notifier openstack-ceilometer-central

Leave a Reply

Your email address will not be published. Required fields are marked *