OpenStack Ussuri : How to use Ceilometer (Cinder)2020/06/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 | | L2 Agent | | Nova Compute | | Keystone Glance | | L3 Agent | | Open vSwitch | | Nova API Cinder API | | Metadata Agent | | L2 Agent | | Neutron Server | | Cinder Volume | | Ceilometer Compute | | Metadata Agent | | Heat API | | | | Gnocchi | | Heat Engine | | | | 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 openstack-cinder-api openstack-cinder-scheduler |
[2] | It's some example to display metrics and meters. |
# list resources [cent@dlp ~(keystone)]$ openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | cffa1ff3-6d1f-46d8-b98b-d488724972c3 | instance | d9c8c215499949cfb249b28bdaba848a | 38e60146-7914-51f2-97f3-fb2cb5885289 | instance_network_interface | d9c8c215499949cfb249b28bdaba848a | 2e00f938-8e21-54ff-967f-b69d9d74b4ba | instance_disk | d9c8c215499949cfb249b28bdaba848a +--------------------------------------+----------------------------+---------------------------------- # test to create a volume [cent@dlp ~(keystone)]$ openstack volume create --size 10 disk01 # list resources [cent@dlp ~(keystone)]$ openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | 2929c442-26c4-41cb-b95f-98c3adceb3ef | instance | d9c8c215499949cfb249b28bdaba8... | 3d231f82-2e4e-5854-817a-b793b51e1743 | instance_disk | d9c8c215499949cfb249b28bdaba8... | 3201a0d6-16fb-5a1a-8646-a76e23b5ad1c | instance_network_interface | d9c8c215499949cfb249b28bdaba8... | cffa1ff3-6d1f-46d8-b98b-d488724972c3 | instance | d9c8c215499949cfb249b28bdaba8... | 38e60146-7914-51f2-97f3-fb2cb5885289 | instance_network_interface | d9c8c215499949cfb249b28bdaba8... | 2e00f938-8e21-54ff-967f-b69d9d74b4ba | instance_disk | d9c8c215499949cfb249b28bdaba8... | 4c0c6f4b-0c31-47c0-abb2-8413fdc6c4a6 | volume | d9c8c215499949cfb249b28bdaba8... +--------------------------------------+----------------------------+---------------------------------- # details of the resource [cent@dlp ~(keystone)]$ openstack metric resource show 4c0c6f4b-0c31-47c0-abb2-8413fdc6c4a6 +-----------------------+-------------------------------------------------------------------+ | Field | Value | +-----------------------+-------------------------------------------------------------------+ | created_by_project_id | 03fc3b5cc0434f748ec562dd74866396 | | created_by_user_id | 97a80018ee3e41ceafc0c8caa42c9b82 | | creator | 97a80018ee3e41ceafc0c8caa42c9b82:03fc3b5cc0434f748ec562dd74866396 | | ended_at | None | | id | 4c0c6f4b-0c31-47c0-abb2-8413fdc6c4a6 | | metrics | volume.size: 26056113-106d-4d8e-bade-b8f7faa69cc3 | | original_resource_id | 4c0c6f4b-0c31-47c0-abb2-8413fdc6c4a6 | | project_id | d9c8c215499949cfb249b28bdaba848a | | revision_end | None | | revision_start | 2020-06-10T07:41:46.027294+00:00 | | started_at | 2020-06-10T07:41:46.027282+00:00 | | type | volume | | user_id | 0e4117de456a4bbaa5aac2cc6507be91 | +-----------------------+-------------------------------------------------------------------+ # display volume size data [cent@dlp ~(keystone)]$ openstack metric measures show 26056113-106d-4d8e-bade-b8f7faa69cc3 +---------------------------+-------------+-------+ | timestamp | granularity | value | +---------------------------+-------------+-------+ | 2020-06-10T16:40:00+09:00 | 300.0 | 10.0 | +---------------------------+-------------+-------+ |
Sponsored Link |