OpenStack Xena : How to use Ceilometer (Glance)2021/10/11 |
This is how to use OpenStack Telemetry Service (Ceilometer) for Glance 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 Glance service to enable Telemetry data collention like follows. |
root@dlp ~(keystone)#
vi /etc/glance/glance-api.conf # add to the end [oslo_messaging_notifications] driver = messagingv2 # RabbitMQ connection info transport_url = rabbit://openstack:password@10.0.0.30 systemctl restart glance-api |
[2] | It's some example to display metrics and meters. |
# display resources root@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... +--------------------------------------+----------------------------+----------------------------------root@dlp ~(keystone)# openstack image list +--------------------------------------+------------+--------+ | ID | Name | Status | +--------------------------------------+------------+--------+ | ba8781c7-85ef-4872-957e-2c27b55275b2 | Ubuntu2004 | active | +--------------------------------------+------------+--------+ # test to download an image root@dlp ~(keystone)# openstack image save --file ubuntu2004.qcow2 Ubuntu2004 # test to add an image root@dlp ~(keystone)# openstack image create "Ubuntu200402" --file ubuntu2004.qcow2 --disk-format qcow2 --container-format bare --public # list resources root@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... | ee2c20a8-f5cd-4844-bfa5-579689a04d38 | image | f4431102f2d9415590e3ac11c6168... +--------------------------------------+----------------------------+---------------------------------- # details of the [image] resource root@dlp ~(keystone)# openstack metric resource show ee2c20a8-f5cd-4844-bfa5-579689a04d38 +-----------------------+-------------------------------------------------------------------+ | Field | Value | +-----------------------+-------------------------------------------------------------------+ | created_by_project_id | 611e3ba8938b475fb9dd8124603f18d3 | | created_by_user_id | 6f2ebeebee50478588d34251b7770183 | | creator | 6f2ebeebee50478588d34251b7770183:611e3ba8938b475fb9dd8124603f18d3 | | ended_at | None | | id | ee2c20a8-f5cd-4844-bfa5-579689a04d38 | | metrics | image.size: 78b25c75-3c0e-47be-b018-34ca488d5e6f | | original_resource_id | ee2c20a8-f5cd-4844-bfa5-579689a04d38 | | project_id | f4431102f2d9415590e3ac11c616858a | | revision_end | None | | revision_start | 2021-10-11T05:31:50.821491+00:00 | | started_at | 2021-10-11T05:31:50.821484+00:00 | | type | image | | user_id | None | +-----------------------+-------------------------------------------------------------------+ # display image size data root@dlp ~(keystone)# openstack metric measures show 78b25c75-3c0e-47be-b018-34ca488d5e6f +---------------------------+-------------+-------------+ | timestamp | granularity | value | +---------------------------+-------------+-------------+ | 2021-10-11T14:30:00+09:00 | 300.0 | 567803904.0 | +---------------------------+-------------+-------------+ |
Sponsored Link |