OpenStack Xena : How to use Ceilometer (Cinder)2021/10/11 |
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 +-----------+-----------+ +-----------+-----------+ +-----------+-----------+ | [ Control Node ] | | [ Storage Node ] | | [ Compute Node ] | | | | | | | | MariaDB RabbitMQ | | Open vSwitch | | Libvirt | | Memcached httpd | | Neutron Server | | Nova Compute | | Keystone Glance | | OVN-Northd | | Open vSwitch | | Nova API | | Cinder Volume | | OVN Metadata Agent | | Cinder API | | Heat API/Engine | | OVN-Controller | | | | Gnocchi httpd | | Ceilometer Compute | | | | Ceilometer Central | | | +-----------------------+ +-----------------------+ +-----------------------+ |
[1] | Change settings for Cinder service to enable Telemetry data collention 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@10.0.0.30 systemctl restart apache2 cinder-scheduler |
[2] | It's some examples to display metrics and meters. |
# display resources ubuntu@dlp ~(keystone)$ openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | 4699d575-1d94-4024-8323-9dfa3599c8d2 | instance | facc545a7f9e4218884c40169158a... | 75d568e7-b47a-54a2-911e-5c189f4c75c8 | instance_disk | facc545a7f9e4218884c40169158a... | 2d65a40a-ec43-58ad-bfd9-c5b4df1059ae | instance_network_interface | facc545a7f9e4218884c40169158a... +--------------------------------------+----------------------------+---------------------------------- # test to create a volume ubuntu@dlp ~(keystone)$ openstack volume create --size 10 disk01 # display resources ubuntu@dlp ~(keystone)$ openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | 4699d575-1d94-4024-8323-9dfa3599c8d2 | instance | facc545a7f9e4218884c40169158a... | 75d568e7-b47a-54a2-911e-5c189f4c75c8 | instance_disk | facc545a7f9e4218884c40169158a... | 2d65a40a-ec43-58ad-bfd9-c5b4df1059ae | instance_network_interface | facc545a7f9e4218884c40169158a... | 8d0c79cd-6f6c-4b7a-93df-36ad398ea307 | volume | facc545a7f9e4218884c40169158a... +--------------------------------------+----------------------------+---------------------------------- # details of [volume] resource ubuntu@dlp ~(keystone)$ openstack metric resource show 8d0c79cd-6f6c-4b7a-93df-36ad398ea307 +-----------------------+-------------------------------------------------------------------+ | Field | Value | +-----------------------+-------------------------------------------------------------------+ | created_by_project_id | 611e3ba8938b475fb9dd8124603f18d3 | | created_by_user_id | 6f2ebeebee50478588d34251b7770183 | | creator | 6f2ebeebee50478588d34251b7770183:611e3ba8938b475fb9dd8124603f18d3 | | ended_at | None | | id | 8d0c79cd-6f6c-4b7a-93df-36ad398ea307 | | metrics | volume.size: c1ba2350-5abf-4b6d-8b50-487b28bd89de | | original_resource_id | 8d0c79cd-6f6c-4b7a-93df-36ad398ea307 | | project_id | facc545a7f9e4218884c40169158a2dc | | revision_end | None | | revision_start | 2021-10-11T05:37:55.895909+00:00 | | started_at | 2021-10-11T05:37:55.895902+00:00 | | type | volume | | user_id | f5a7ffdd6e54434badbd75ba0e6d6ac2 | +-----------------------+-------------------------------------------------------------------+ # display volume size data ubuntu@dlp ~(keystone)$ openstack metric measures show c1ba2350-5abf-4b6d-8b50-487b28bd89de +---------------------------+-------------+-------+ | timestamp | granularity | value | +---------------------------+-------------+-------+ | 2021-10-11T14:35:00+09:00 | 300.0 | 10.0 | +---------------------------+-------------+-------+ |
Sponsored Link |