Enable Block Storage meters for Ubuntu

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

  1. Restart the Block Storage services on the controller node:

    # service cinder-api restart
    # service cinder-scheduler restart
    
  2. Restart the Block Storage services on the storage nodes:

    # service cinder-volume restart