CentOS Stream 9
Sponsored Link

OpenStack Yoga : How to use Ceilometer (Cinder)2022/06/13

 
This is how to use OpenStack Telemetry Service (Ceilometer) for Cinder 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 Cinder service to enable Telemetry data collection like follows.
Change on all Nodes Cinder services are running.
[root@dlp ~(keystone)]#
vi /etc/cinder/cinder.conf
# add to the end

[oslo_messaging_notifications]
driver = messagingv2
transport_url = rabbit://openstack:password@dlp.srv.world
[root@dlp ~(keystone)]#
systemctl restart openstack-cinder-api openstack-cinder-scheduler

[2] It's some example to display metrics and meters.
# list resources

[cent@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... 
+--------------------------------------+----------------------------+----------------------------------

# test to create a volume

[cent@dlp ~(keystone)]$
openstack volume create --size 10 disk01

# list resources

[cent@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... 
| bddbc46f-d71b-4a47-95b9-b3f655bbe3a2 | volume                     | 911e5ff7686741c782d6acc6d7155... 
+--------------------------------------+----------------------------+----------------------------------

# details of the resource

[cent@dlp ~(keystone)]$
openstack metric resource show bddbc46f-d71b-4a47-95b9-b3f655bbe3a2

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | 0f2625947bf0433a9519ba8a29434bdf                                  |
| created_by_user_id    | efeba9b14c234edbb78d0cbad397e6ed                                  |
| creator               | efeba9b14c234edbb78d0cbad397e6ed:0f2625947bf0433a9519ba8a29434bdf |
| ended_at              | None                                                              |
| id                    | bddbc46f-d71b-4a47-95b9-b3f655bbe3a2                              |
| metrics               | volume.size: f00f547e-cbe3-4e2d-af34-f1d171a62f51                 |
| original_resource_id  | bddbc46f-d71b-4a47-95b9-b3f655bbe3a2                              |
| project_id            | 911e5ff7686741c782d6acc6d7155db1                                  |
| revision_end          | None                                                              |
| revision_start        | 2022-06-13T06:23:13.199611+00:00                                  |
| started_at            | 2022-06-13T06:23:13.199604+00:00                                  |
| type                  | volume                                                            |
| user_id               | 1ff4591a7f8140fcad38fd9f606a66a6                                  |
+-----------------------+-------------------------------------------------------------------+

# display volume size data

[cent@dlp ~(keystone)]$
openstack metric measures show f00f547e-cbe3-4e2d-af34-f1d171a62f51

+---------------------------+-------------+-------+
| timestamp                 | granularity | value |
+---------------------------+-------------+-------+
| 2022-06-13T15:20:00+09:00 |       300.0 |  10.0 |
+---------------------------+-------------+-------+
Matched Content