OpenStack Yoga : How to use Ceilometer (Glance)2022/05/07 |
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 +-----------+-----------+ +-----------+-----------+ +-----------+-----------+ | [ dlp.srv.world ] | | [ network.srv.world ] | | [ node01.srv.world ] | | (Control Node) | | (Network Node) | | (Compute Node) | | | | | | | | MariaDB RabbitMQ | | Open vSwitch | | Libvirt | | Memcached httpd | | Neutron Server | | Nova Compute | | Keystone Glance | | OVN-Northd | | Open vSwitch | | Nova API Cinder API | | Cinder Volume | | OVN Metadata Agent | | | | Gnocchi httpd | | OVN-Controller | | | | Ceilometer Central | | Ceilometer Compute | +-----------------------+ +-----------------------+ +-----------------------+ |
[1] | Change settings for Glance service to enable Telemetry data collection 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@dlp.srv.world 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 +--------------------------------------+----------------------------+---------------------------------- | 6781b9c7-19c6-4419-a910-d0ae43c7526c | instance | 66102fdb888d4556a59dcff8b631f... | e540d3c4-7e04-5ef8-8399-5b66d78d1056 | instance_network_interface | 66102fdb888d4556a59dcff8b631f... | a302db56-ba64-5f36-9182-f3a9572aab1d | instance_disk | 66102fdb888d4556a59dcff8b631f... +--------------------------------------+----------------------------+----------------------------------root@dlp ~(keystone)# openstack image list +--------------------------------------+------------+--------+ | ID | Name | Status | +--------------------------------------+------------+--------+ | 70f856cc-6f3a-4cc3-b576-53f829a6d714 | Ubuntu2204 | active | +--------------------------------------+------------+--------+ # test to download an image root@dlp ~(keystone)# openstack image save --file ubuntu2204.qcow2 Ubuntu2204 # test to add an image root@dlp ~(keystone)# openstack image create "Ubuntu22040-2" --file ubuntu2204.qcow2 --disk-format qcow2 --container-format bare --public # list resources root@dlp ~(keystone)# openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | 6781b9c7-19c6-4419-a910-d0ae43c7526c | instance | 66102fdb888d4556a59dcff8b631f... | e540d3c4-7e04-5ef8-8399-5b66d78d1056 | instance_network_interface | 66102fdb888d4556a59dcff8b631f... | a302db56-ba64-5f36-9182-f3a9572aab1d | instance_disk | 66102fdb888d4556a59dcff8b631f... | d78f9dee-5f23-4fc7-9c17-9a58935ec561 | image | de339c4cb5984140ab0b243364e3a... +--------------------------------------+----------------------------+---------------------------------- # details of the [image] resource root@dlp ~(keystone)# openstack metric resource show d78f9dee-5f23-4fc7-9c17-9a58935ec561 +-----------------------+-------------------------------------------------------------------+ | Field | Value | +-----------------------+-------------------------------------------------------------------+ | created_by_project_id | c1c4d9a5313f43bd9f6f555e2d34ab28 | | created_by_user_id | 66d094f65ddd49ebb6e27f48ed2c6448 | | creator | 66d094f65ddd49ebb6e27f48ed2c6448:c1c4d9a5313f43bd9f6f555e2d34ab28 | | ended_at | None | | id | d78f9dee-5f23-4fc7-9c17-9a58935ec561 | | metrics | image.size: d6332a64-5a43-443c-9c9d-dffac8bb3b44 | | original_resource_id | d78f9dee-5f23-4fc7-9c17-9a58935ec561 | | project_id | de339c4cb5984140ab0b243364e3a0f7 | | revision_end | None | | revision_start | 2022-05-05T15:43:54.349306+00:00 | | started_at | 2022-05-05T15:43:54.349300+00:00 | | type | image | | user_id | None | +-----------------------+-------------------------------------------------------------------+ # display image size data root@dlp ~(keystone)# openstack metric measures show d6332a64-5a43-443c-9c9d-dffac8bb3b44 +---------------------------+-------------+-------------+ | timestamp | granularity | value | +---------------------------+-------------+-------------+ | 2022-05-05T15:40:00+00:00 | 300.0 | 625278976.0 | +---------------------------+-------------+-------------+ |
Sponsored Link |
|