CentOS Stream 9
Sponsored Link

OpenStack Bobcat : How to use Ceilometer (Cinder)2023/10/27

 
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  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 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                       
+--------------------------------------+----------------------------+----------------------------------
| 78b8c394-be14-4312-84e8-06eeebbd74f3 | instance                   | f4598dfd3b8a47149234b6892d18d... 
| c9aff847-aa53-5449-b384-1fcd612499fd | instance_network_interface | f4598dfd3b8a47149234b6892d18d... 
| e2b0e7f8-a93f-5ec4-851f-9e98ec9cd596 | instance_disk              | f4598dfd3b8a47149234b6892d18d... 
+--------------------------------------+----------------------------+----------------------------------

# 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                       
+--------------------------------------+----------------------------+----------------------------------
| 78b8c394-be14-4312-84e8-06eeebbd74f3 | instance                   | f4598dfd3b8a47149234b6892d18d... 
| c9aff847-aa53-5449-b384-1fcd612499fd | instance_network_interface | f4598dfd3b8a47149234b6892d18d... 
| e2b0e7f8-a93f-5ec4-851f-9e98ec9cd596 | instance_disk              | f4598dfd3b8a47149234b6892d18d... 
| aff2ccdf-9e34-4bf3-849d-50603b7c4806 | volume                     | f4598dfd3b8a47149234b6892d18d... 
+--------------------------------------+----------------------------+----------------------------------

# details of the resource

[cent@dlp ~(keystone)]$
openstack metric resource show aff2ccdf-9e34-4bf3-849d-50603b7c4806

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | 5d97881520b34e6bbf1f15e778c82fe4                                  |
| created_by_user_id    | be0b90dfc5d24277ae1bfd45e4cac1f8                                  |
| creator               | be0b90dfc5d24277ae1bfd45e4cac1f8:5d97881520b34e6bbf1f15e778c82fe4 |
| ended_at              | None                                                              |
| id                    | aff2ccdf-9e34-4bf3-849d-50603b7c4806                              |
| metrics               | volume.size: 7b323eeb-dfe1-4454-8ee2-a44337b664f3                 |
| original_resource_id  | aff2ccdf-9e34-4bf3-849d-50603b7c4806                              |
| project_id            | f4598dfd3b8a47149234b6892d18d5a4                                  |
| revision_end          | None                                                              |
| revision_start        | 2023-10-27T01:07:55.530764+00:00                                  |
| started_at            | 2023-10-27T01:07:55.530759+00:00                                  |
| type                  | volume                                                            |
| user_id               | d70a5f7908de4cd9aa8e189b725244a9                                  |
+-----------------------+-------------------------------------------------------------------+

# display volume size data

[cent@dlp ~(keystone)]$
openstack metric measures show 7b323eeb-dfe1-4454-8ee2-a44337b664f3

+---------------------------+-------------+-------+
| timestamp                 | granularity | value |
+---------------------------+-------------+-------+
| 2023-10-27T10:05:00+09:00 |       300.0 |  10.0 |
+---------------------------+-------------+-------+
Matched Content