OpenStack Zed : How to use Ceilometer (Glance)2023/06/30 |
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 | | Neutron L2/L3 Agent | | Libvirt | | Memcached Nginx | | Neutron Metadata | | Nova Compute | | Keystone httpd | | Open vSwitch | | Neutron L2 Agent | | Glance Nova API | | iSCSI Target | | Open vSwitch | | Neutron Server | | Cinder Volume | | Ceilometer Compute | | Neutron Metadata | | httpd Gnocchi | | | | Cinder API | | Ceilometer Central | | | +-----------------------+ +-----------------------+ +-----------------------+ |
[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 +--------------------------------------+----------------------------+---------------------------------- | c3a4a792-a7ac-41bd-8c93-7fd162016f22 | instance | 1c2f5dc8c4f9494fbaaa4217c8e35... | 88e37527-710f-53a8-9bb3-4cf76791b60b | instance_disk | 1c2f5dc8c4f9494fbaaa4217c8e35... | 18c74205-a37f-5ea3-b7db-c342b76a24c2 | instance_network_interface | 1c2f5dc8c4f9494fbaaa4217c8e35... +--------------------------------------+----------------------------+----------------------------------root@dlp ~(keystone)# openstack image list +--------------------------------------+----------+--------+ | ID | Name | Status | +--------------------------------------+----------+--------+ | 3a660af6-3f41-4c0f-b2a8-55127dfc3c60 | Debian12 | active | +--------------------------------------+----------+--------+ # test to download an image root@dlp ~(keystone)# openstack image save --file debian12.qcow2 Debian12 # test to add an image root@dlp ~(keystone)# openstack image create "Debian12-2" --file debian12.qcow2 --disk-format qcow2 --container-format bare --public # list resources root@dlp ~(keystone)# openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | c3a4a792-a7ac-41bd-8c93-7fd162016f22 | instance | 1c2f5dc8c4f9494fbaaa4217c8e35... | 88e37527-710f-53a8-9bb3-4cf76791b60b | instance_disk | 1c2f5dc8c4f9494fbaaa4217c8e35... | 18c74205-a37f-5ea3-b7db-c342b76a24c2 | instance_network_interface | 1c2f5dc8c4f9494fbaaa4217c8e35... | 1857ec36-cc70-4cd8-95c4-d15e6aa39328 | image | 757625ae78404e38a8cfdd7c6d262... +--------------------------------------+----------------------------+---------------------------------- # details of the [image] resource root@dlp ~(keystone)# openstack metric resource show 1857ec36-cc70-4cd8-95c4-d15e6aa39328 +-----------------------+-------------------------------------------------------------------+ | Field | Value | +-----------------------+-------------------------------------------------------------------+ | created_by_project_id | d8b09d86ed7743039f92b2e542ea26c1 | | created_by_user_id | 89f390200afd4423bd9322787a94efa8 | | creator | 89f390200afd4423bd9322787a94efa8:d8b09d86ed7743039f92b2e542ea26c1 | | ended_at | None | | id | 1857ec36-cc70-4cd8-95c4-d15e6aa39328 | | metrics | image.size: ec497f00-0546-4ea8-a5af-66fa1ee785c3 | | original_resource_id | 1857ec36-cc70-4cd8-95c4-d15e6aa39328 | | project_id | 757625ae78404e38a8cfdd7c6d262860 | | revision_end | None | | revision_start | 2023-06-30T02:41:17.379802+00:00 | | started_at | 2023-06-30T02:41:17.379794+00:00 | | type | image | | user_id | None | +-----------------------+-------------------------------------------------------------------+ # display image size data root@dlp ~(keystone)# openstack metric measures show ec497f00-0546-4ea8-a5af-66fa1ee785c3 +---------------------------+-------------+--------------+ | timestamp | granularity | value | +---------------------------+-------------+--------------+ | 2023-06-29T21:40:00-05:00 | 300.0 | 1938882560.0 | +---------------------------+-------------+--------------+ |
Sponsored Link |
|