Enable Block Storage meters for Red Hat Enterprise Linux and CentOS¶
Telemetry uses notifications to collect Block Storage service meters. Perform these steps on the controller and Block Storage nodes.
Note
Your environment must include the Block Storage service.
Configure Cinder to use Telemetry¶
Edit the /etc/cinder/cinder.conf
file and complete the
following actions:
In the
[oslo_messaging_notifications]
section, configure notifications:[oslo_messaging_notifications] ... driver = messagingv2
Enable periodic usage statistics relating to block storage. To use it, you must run this command in the following format:
$ cinder-volume-usage-audit --start_time='YYYY-MM-DD HH:MM:SS' \ --end_time='YYYY-MM-DD HH:MM:SS' --send_actions
This script outputs what volumes or snapshots were created, deleted, or exists in a given period of time and some information about these volumes or snapshots.
Using this script via cron you can get notifications periodically, for example, every 5 minutes:
*/5 * * * * /path/to/cinder-volume-usage-audit --send_actions
Finalize installation¶
Restart the Block Storage services on the controller node:
# systemctl restart openstack-cinder-api.service openstack-cinder-scheduler.service
Restart the Block Storage services on the storage nodes:
# systemctl restart openstack-cinder-volume.service