CentOS Stream 9
Sponsored Link

OpenStack Zed : How to use Ceilometer (Glance)2022/11/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
+-----------+-----------+     +-----------+-----------+     +-----------+-----------+
|   [ dlp.srv.world ]   |     | [ network.srv.world ] |     |  [ node01.srv.world ] |
|     (Control Node)    |     |     (Network Node)    |     |     (Compute Node)    |
|                       |     |                       |     |                       |
|  MariaDB    RabbitMQ  |     |      Open vSwitch     |     |        Libvirt        |
|  Memcached  Nginx     |     |     Neutron Server    |     |      Nova Compute     |
|  Keystone   httpd     |     |      OVN-Northd       |     |      Open vSwitch     |
|  Glance     Nova API  |     |  Nginx  iSCSI Target  |     |   OVN Metadata Agent  |
|  Cinder API           |     |     Cinder Volume     |     |     OVN-Controller    |
|                       |     |     Gnocchi httpd     |     |   Ceilometer Compute  |
|                       |     |   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
[root@dlp ~(keystone)]#
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                       
+--------------------------------------+----------------------------+----------------------------------
| 158685ed-8159-4aad-a294-3227b427f7e1 | instance                   | 28b6e37c787240e4a975d3614821c... 
| 18ab0b6e-fe5c-5578-90ec-2a646869eab1 | instance_network_interface | 28b6e37c787240e4a975d3614821c... 
| 256bfff5-a44e-5dc8-961e-553754909551 | instance_disk              | 28b6e37c787240e4a975d3614821c... 
+--------------------------------------+----------------------------+----------------------------------

[root@dlp ~(keystone)]#
openstack image list

+--------------------------------------+----------------+--------+
| ID                                   | Name           | Status |
+--------------------------------------+----------------+--------+
| 8367cc21-61f4-480b-8d03-90c057c7a7cf | 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                       
+--------------------------------------+----------------------------+----------------------------------
| 158685ed-8159-4aad-a294-3227b427f7e1 | instance                   | 28b6e37c787240e4a975d3614821c... 
| 18ab0b6e-fe5c-5578-90ec-2a646869eab1 | instance_network_interface | 28b6e37c787240e4a975d3614821c... 
| 256bfff5-a44e-5dc8-961e-553754909551 | instance_disk              | 28b6e37c787240e4a975d3614821c... 
| 73db6904-b74f-4013-82ba-7928164c26ba | image                      | 939974d6fc8e400eb01f7dd749935... 
+--------------------------------------+----------------------------+----------------------------------

# details of the resource

[root@dlp ~(keystone)]#
openstack metric resource show 73db6904-b74f-4013-82ba-7928164c26ba

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | 62f531f4d2934e75b8d7f11cd7d53be3                                  |
| created_by_user_id    | 3567bb8bb7594c2189124b7aca36e6d3                                  |
| creator               | 3567bb8bb7594c2189124b7aca36e6d3:62f531f4d2934e75b8d7f11cd7d53be3 |
| ended_at              | None                                                              |
| id                    | 73db6904-b74f-4013-82ba-7928164c26ba                              |
| metrics               | image.size: e9adb0fe-dcf8-4c1d-82b5-c3c9920289a6                  |
| original_resource_id  | 73db6904-b74f-4013-82ba-7928164c26ba                              |
| project_id            | 939974d6fc8e400eb01f7dd749935ea3                                  |
| revision_end          | None                                                              |
| revision_start        | 2022-11-11T08:02:42.953218+00:00                                  |
| started_at            | 2022-11-11T08:02:42.953213+00:00                                  |
| type                  | image                                                             |
| user_id               | None                                                              |
+-----------------------+-------------------------------------------------------------------+

# display image size data

[root@dlp ~(keystone)]#
openstack metric measures show e9adb0fe-dcf8-4c1d-82b5-c3c9920289a6

+---------------------------+-------------+--------------+
| timestamp                 | granularity |        value |
+---------------------------+-------------+--------------+
| 2022-11-11T17:00:00+09:00 |       300.0 | 2228682752.0 |
+---------------------------+-------------+--------------+
Matched Content