OpenStack Yoga : How to use Ceilometer (Glance)2022/06/02 |
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 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@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 +--------------------------------------+----------------------------+---------------------------------- | dd438403-6097-45bd-aca6-945d29e100ce | instance | c57c47e1df204aa6b437cdcbae628... | bbd4fd1d-5a1f-5a70-aac7-81b72a8ece38 | instance_network_interface | 3d85d1e79d654b3dade01eb5bfbf0... | f0f7ad4d-fcc3-56e2-81fa-fb086d93d6d3 | instance_disk | 3d85d1e79d654b3dade01eb5bfbf0... +--------------------------------------+----------------------------+----------------------------------[root@dlp ~(keystone)]# openstack image list +--------------------------------------+-----------------+--------+ | ID | Name | Status | +--------------------------------------+-----------------+--------+ | 7be5b7ab-36e8-43c7-95dd-34b4139a0e44 | CentOS-Stream-8 | active | +--------------------------------------+-----------------+--------+ # test to download an image [root@dlp ~(keystone)]# openstack image save --file centos-st8.qcow2 CentOS-Stream-8 # test to add an image [root@dlp ~(keystone)]# openstack image create "CentOS-ST8" --file centos-st8.qcow2 --disk-format qcow2 --container-format bare --public # list resources [root@dlp ~(keystone)]# openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | dd438403-6097-45bd-aca6-945d29e100ce | instance | c57c47e1df204aa6b437cdcbae628... | bbd4fd1d-5a1f-5a70-aac7-81b72a8ece38 | instance_network_interface | 3d85d1e79d654b3dade01eb5bfbf0... | f0f7ad4d-fcc3-56e2-81fa-fb086d93d6d3 | instance_disk | 3d85d1e79d654b3dade01eb5bfbf0... | 7efe4a16-0fdb-4828-a6b1-2476e4bb2c90 | image | 0609d3b3b398456187fb705ec9224... +--------------------------------------+----------------------------+---------------------------------- # details of the resource [root@dlp ~(keystone)]# openstack metric resource show 7efe4a16-0fdb-4828-a6b1-2476e4bb2c90 +-----------------------+-------------------------------------------------------------------+ | Field | Value | +-----------------------+-------------------------------------------------------------------+ | created_by_project_id | 8787527217494c6a87dd5a3b68dce1ef | | created_by_user_id | 0101cdc1b5f64f998ec4d7541fed4771 | | creator | 0101cdc1b5f64f998ec4d7541fed4771:8787527217494c6a87dd5a3b68dce1ef | | ended_at | None | | id | 7efe4a16-0fdb-4828-a6b1-2476e4bb2c90 | | metrics | image.size: 904c6ffc-b228-47df-99f0-2e0bd1519381 | | original_resource_id | 7efe4a16-0fdb-4828-a6b1-2476e4bb2c90 | | project_id | 0609d3b3b398456187fb705ec9224c4a | | revision_end | None | | revision_start | 2022-06-02T02:40:50.462480+00:00 | | started_at | 2022-06-02T02:40:50.462471+00:00 | | type | image | | user_id | None | +-----------------------+-------------------------------------------------------------------+ # display image size data [root@dlp ~(keystone)]# openstack metric measures show 904c6ffc-b228-47df-99f0-2e0bd1519381 +---------------------------+-------------+--------------+ | timestamp | granularity | value | +---------------------------+-------------+--------------+ | 2022-06-02T11:40:00+09:00 | 300.0 | 2610888704.0 | +---------------------------+-------------+--------------+ |
Sponsored Link |
|