OpenStack Rocky : How to use Ceilometer (Cinder)2018/09/06 |
This is how to use OpenStack Telemetry Service (Ceilometer) for Cinder service.
This example is based on the emvironment 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 +--------------------------------------+----------------------------+---------------------------------- | 45d4a9ba-d6ec-4263-a81c-487702f98e33 | instance | 3c9dc9d8d71149a7b835e1f5813d2... | bbdaa383-5531-57a5-b411-e991064fa095 | instance_network_interface | 3c9dc9d8d71149a7b835e1f5813d2... | f909ac06-3daa-566e-93d4-10141ad2ce8a | instance_disk | 3c9dc9d8d71149a7b835e1f5813d2... | 5b30f928-8834-4ab5-a5ce-760c48d4c9b7 | instance | 3c9dc9d8d71149a7b835e1f5813d2... +--------------------------------------+----------------------------+---------------------------------- # 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 +--------------------------------------+----------------------------+---------------------------------- | 45d4a9ba-d6ec-4263-a81c-487702f98e33 | instance | 3c9dc9d8d71149a7b835e1f5813d2... | bbdaa383-5531-57a5-b411-e991064fa095 | instance_network_interface | 3c9dc9d8d71149a7b835e1f5813d2... | f909ac06-3daa-566e-93d4-10141ad2ce8a | instance_disk | 3c9dc9d8d71149a7b835e1f5813d2... | 5b30f928-8834-4ab5-a5ce-760c48d4c9b7 | instance | 3c9dc9d8d71149a7b835e1f5813d2... | d3b89dac-7214-462c-9546-e5db05bd411a | volume | 3c9dc9d8d71149a7b835e1f5813d2... +--------------------------------------+----------------------------+---------------------------------- # details of the resource [cent@dlp ~(keystone)]$ openstack metric resource show d3b89dac-7214-462c-9546-e5db05bd411a +-----------------------+-------------------------------------------------------------------+ | Field | Value | +-----------------------+-------------------------------------------------------------------+ | created_by_project_id | ece4ac6c7e764a979e36ba0b2faf848e | | created_by_user_id | cfc889992c144012a0092b270bfa0fbd | | creator | cfc889992c144012a0092b270bfa0fbd:ece4ac6c7e764a979e36ba0b2faf848e | | ended_at | None | | id | d3b89dac-7214-462c-9546-e5db05bd411a | | metrics | volume.size: 505fbdf9-5a1d-4ce4-aeb5-fb074ef8c79e | | original_resource_id | d3b89dac-7214-462c-9546-e5db05bd411a | | project_id | 3c9dc9d8d71149a7b835e1f5813d2eb8 | | revision_end | None | | revision_start | 2018-09-06T06:01:14.315294+00:00 | | started_at | 2018-09-06T06:01:14.315220+00:00 | | type | volume | | user_id | e2252ff04be3409e8e823a0a3a925cad | +-----------------------+-------------------------------------------------------------------+ # display volume size [cent@dlp ~(keystone)]$ openstack metric measures show 505fbdf9-5a1d-4ce4-aeb5-fb074ef8c79e +---------------------------+-------------+-------+ | timestamp | granularity | value | +---------------------------+-------------+-------+ | 2018-09-06T15:00:00+09:00 | 300.0 | 10.0 | +---------------------------+-------------+-------+ |
Sponsored Link |