OpenStack Zed : How to use Ceilometer (Cinder)2023/06/30 |
This is how to use OpenStack Telemetry Service (Ceilometer) for Cinder service.
This example is based on the environment like follows.
------------+--------------------------+--------------------------+------------ | | | eth0|10.0.0.30 eth0|10.0.0.50 eth0|10.0.0.51 +-----------+-----------+ +-----------+-----------+ +-----------+-----------+ | [ dlp.srv.world ] | | [ network.srv.world ] | | [ node01.srv.world ] | | (Control Node) | | (Network Node) | | (Compute Node) | | | | | | | | MariaDB RabbitMQ | | Neutron L2/L3 Agent | | Libvirt | | Memcached Nginx | | Neutron Metadata | | Nova Compute | | Keystone httpd | | Open vSwitch | | Neutron L2 Agent | | Glance Nova API | | iSCSI Target | | Open vSwitch | | Neutron Server | | Cinder Volume | | Ceilometer Compute | | Neutron Metadata | | httpd Gnocchi | | | | Cinder API | | Ceilometer Central | | | +-----------------------+ +-----------------------+ +-----------------------+ |
[1] | Change settings for Cinder service to enable Telemetry data collection like follows. Change on all Nodes Cinder services are running. |
root@dlp ~(keystone)#
vi /etc/cinder/cinder.conf # add to the end [oslo_messaging_notifications] driver = messagingv2 transport_url = rabbit://openstack:password@dlp.srv.world systemctl restart apache2 cinder-scheduler |
[2] | It's some examples to display metrics and meters. |
# display resources debian@dlp ~(keystone)$ openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | c3a4a792-a7ac-41bd-8c93-7fd162016f22 | instance | 1c2f5dc8c4f9494fbaaa4217c8e35... | 88e37527-710f-53a8-9bb3-4cf76791b60b | instance_disk | 1c2f5dc8c4f9494fbaaa4217c8e35... | 18c74205-a37f-5ea3-b7db-c342b76a24c2 | instance_network_interface | 1c2f5dc8c4f9494fbaaa4217c8e35... +--------------------------------------+----------------------------+---------------------------------- # test to create a volume debian@dlp ~(keystone)$ openstack volume create --size 10 disk01 # display resources debian@dlp ~(keystone)$ openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | c3a4a792-a7ac-41bd-8c93-7fd162016f22 | instance | 1c2f5dc8c4f9494fbaaa4217c8e35... | 88e37527-710f-53a8-9bb3-4cf76791b60b | instance_disk | 1c2f5dc8c4f9494fbaaa4217c8e35... | 18c74205-a37f-5ea3-b7db-c342b76a24c2 | instance_network_interface | 1c2f5dc8c4f9494fbaaa4217c8e35... | f7b74e86-2484-42f1-b657-ecf7fa8b61f8 | volume | 1c2f5dc8c4f9494fbaaa4217c8e35... +--------------------------------------+----------------------------+---------------------------------- # details of [volume] resource debian@dlp ~(keystone)$ openstack metric resource show f7b74e86-2484-42f1-b657-ecf7fa8b61f8 +-----------------------+-------------------------------------------------------------------+ | Field | Value | +-----------------------+-------------------------------------------------------------------+ | created_by_project_id | d8b09d86ed7743039f92b2e542ea26c1 | | created_by_user_id | 89f390200afd4423bd9322787a94efa8 | | creator | 89f390200afd4423bd9322787a94efa8:d8b09d86ed7743039f92b2e542ea26c1 | | ended_at | None | | id | f7b74e86-2484-42f1-b657-ecf7fa8b61f8 | | metrics | volume.size: ceba3cc3-7960-452d-b642-f17ea5c2885f | | original_resource_id | f7b74e86-2484-42f1-b657-ecf7fa8b61f8 | | project_id | 1c2f5dc8c4f9494fbaaa4217c8e3585a | | revision_end | None | | revision_start | 2023-06-30T02:52:34.627128+00:00 | | started_at | 2023-06-30T02:52:34.627122+00:00 | | type | volume | | user_id | de51d5f0ee2c485885877d21f5b424e0 | +-----------------------+-------------------------------------------------------------------+ # display volume size data debian@dlp ~(keystone)$ openstack metric measures show ceba3cc3-7960-452d-b642-f17ea5c2885f +---------------------------+-------------+-------+ | timestamp | granularity | value | +---------------------------+-------------+-------+ | 2023-06-29T21:50:00-05:00 | 300.0 | 10.0 | +---------------------------+-------------+-------+ |
Sponsored Link |
|