CentOS Stream 9
Sponsored Link

OpenStack Dalmatian : How to use Ceilometer (Cinder)2024/10/16

 

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 last line

[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                       
+--------------------------------------+----------------------------+----------------------------------
| 3d753408-6705-4cbf-acd8-2e09d975b973 | instance                   | 756e2b4937c44d3991028e294f92d... 
| d9634b44-bf91-5f24-b3e9-a3f82258e684 | instance_disk              | 756e2b4937c44d3991028e294f92d... 
| 7a63d41b-5fef-566a-bc9d-e4881287698c | instance_network_interface | 756e2b4937c44d3991028e294f92d... 
+--------------------------------------+----------------------------+----------------------------------

# 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                       
+--------------------------------------+----------------------------+----------------------------------
| 3d753408-6705-4cbf-acd8-2e09d975b973 | instance                   | 756e2b4937c44d3991028e294f92d... 
| d9634b44-bf91-5f24-b3e9-a3f82258e684 | instance_disk              | 756e2b4937c44d3991028e294f92d... 
| 7a63d41b-5fef-566a-bc9d-e4881287698c | instance_network_interface | 756e2b4937c44d3991028e294f92d... 
| 9116852b-c923-4797-8e34-5c3481cacee8 | volume                     | 756e2b4937c44d3991028e294f92d... 
+--------------------------------------+----------------------------+----------------------------------

# details of the resource

[cent@dlp ~(keystone)]$
openstack metric resource show 9116852b-c923-4797-8e34-5c3481cacee8

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | aff8e7e402dc4d9e849bbe0e34fa4538                                  |
| created_by_user_id    | 49ad0cbb8d944b8fbe748507c42d0702                                  |
| creator               | 49ad0cbb8d944b8fbe748507c42d0702:aff8e7e402dc4d9e849bbe0e34fa4538 |
| ended_at              | None                                                              |
| id                    | 9116852b-c923-4797-8e34-5c3481cacee8                              |
| metrics               | volume.size: 12a6e16e-2087-4e13-b1e2-6c5697d9a1f1                 |
| original_resource_id  | 9116852b-c923-4797-8e34-5c3481cacee8                              |
| project_id            | 756e2b4937c44d3991028e294f92d89a                                  |
| revision_end          | None                                                              |
| revision_start        | 2024-10-16T01:16:49.744174+00:00                                  |
| started_at            | 2024-10-16T01:16:33.207894+00:00                                  |
| type                  | volume                                                            |
| user_id               | 19c7530debb54eb0bfe6dc47aae3df32                                  |
+-----------------------+-------------------------------------------------------------------+

# display volume size data

[cent@dlp ~(keystone)]$
openstack metric measures show 12a6e16e-2087-4e13-b1e2-6c5697d9a1f1

+---------------------------+-------------+-------+
| timestamp                 | granularity | value |
+---------------------------+-------------+-------+
| 2024-10-16T10:15:00+09:00 |       300.0 |  10.0 |
+---------------------------+-------------+-------+
Matched Content