OpenStack Yoga : How to use Ceilometer (Glance)2022/06/13 |
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 openstack-glance-api |
[2] | It's some example to display metrics and meters. |
# list resources [root@dlp ~(keystone)]# openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | 25ef320e-b16e-4085-96ef-af7fa0d33cfb | instance | 911e5ff7686741c782d6acc6d7155... | f7e5361a-fd6c-568a-a718-0168c5ae2c65 | instance_network_interface | 911e5ff7686741c782d6acc6d7155... | 4f70f768-ed81-58c8-be82-704e89dfc79d | instance_disk | 911e5ff7686741c782d6acc6d7155... +--------------------------------------+----------------------------+----------------------------------[root@dlp ~(keystone)]# openstack image list +--------------------------------------+----------------+--------+ | ID | Name | Status | +--------------------------------------+----------------+--------+ | 1044ab46-c42b-4cf6-ab1f-aaeb011fb3b9 | CentOS-Stream9 | active | +--------------------------------------+----------------+--------+ # test to download an image [root@dlp ~(keystone)]# openstack image save --file centos-st9.qcow2 CentOS-Stream9 # test to add an image [root@dlp ~(keystone)]# openstack image create "CentOS-ST9" --file centos-st9.qcow2 --disk-format qcow2 --container-format bare --public # list resources [root@dlp ~(keystone)]# openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | 25ef320e-b16e-4085-96ef-af7fa0d33cfb | instance | 911e5ff7686741c782d6acc6d7155... | f7e5361a-fd6c-568a-a718-0168c5ae2c65 | instance_network_interface | 911e5ff7686741c782d6acc6d7155... | 4f70f768-ed81-58c8-be82-704e89dfc79d | instance_disk | 911e5ff7686741c782d6acc6d7155... | dfa1b649-0333-4a70-98f6-77699df1d235 | image | 9c8b7457e8db4cbc995a767706804... +--------------------------------------+----------------------------+---------------------------------- # details of the resource [root@dlp ~(keystone)]# openstack metric resource show dfa1b649-0333-4a70-98f6-77699df1d235 +-----------------------+-------------------------------------------------------------------+ | Field | Value | +-----------------------+-------------------------------------------------------------------+ | created_by_project_id | 0f2625947bf0433a9519ba8a29434bdf | | created_by_user_id | efeba9b14c234edbb78d0cbad397e6ed | | creator | efeba9b14c234edbb78d0cbad397e6ed:0f2625947bf0433a9519ba8a29434bdf | | ended_at | None | | id | dfa1b649-0333-4a70-98f6-77699df1d235 | | metrics | image.size: b6b99445-56ff-4184-a2f6-4c406f9ac595 | | original_resource_id | dfa1b649-0333-4a70-98f6-77699df1d235 | | project_id | 9c8b7457e8db4cbc995a767706804b70 | | revision_end | None | | revision_start | 2022-06-13T06:16:04.893399+00:00 | | started_at | 2022-06-13T06:16:04.893385+00:00 | | type | image | | user_id | None | +-----------------------+-------------------------------------------------------------------+ # display image size data [root@dlp ~(keystone)]# openstack metric measures show b6b99445-56ff-4184-a2f6-4c406f9ac595 +---------------------------+-------------+--------------+ | timestamp | granularity | value | +---------------------------+-------------+--------------+ | 2022-06-13T15:15:00+09:00 | 300.0 | 2226520064.0 | +---------------------------+-------------+--------------+ |
Sponsored Link |