Ubuntu 22.04
Sponsored Link

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

 
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 apache2 cinder-scheduler

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

ubuntu@dlp ~(keystone)$
openstack metric resource list

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| 530698ed-413e-4bda-b02e-8f6f60380bd1 | instance                   | f30cd546632e484cb24414d832076... 
| 08fd4272-e83e-5e79-8a9a-05905598f8a5 | instance_network_interface | f30cd546632e484cb24414d832076... 
| 6b32c72e-9cef-54f0-9a38-dc657e110413 | instance_disk              | f30cd546632e484cb24414d832076... 
+--------------------------------------+----------------------------+----------------------------------

# test to create a volume

ubuntu@dlp ~(keystone)$
openstack volume create --size 10 disk01

# display resources

ubuntu@dlp ~(keystone)$
openstack metric resource list

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| 530698ed-413e-4bda-b02e-8f6f60380bd1 | instance                   | f30cd546632e484cb24414d832076... 
| 08fd4272-e83e-5e79-8a9a-05905598f8a5 | instance_network_interface | f30cd546632e484cb24414d832076... 
| 6b32c72e-9cef-54f0-9a38-dc657e110413 | instance_disk              | f30cd546632e484cb24414d832076... 
| 26cfb920-601e-458d-b09c-c207a1852f8b | volume                     | f30cd546632e484cb24414d832076... 
+--------------------------------------+----------------------------+----------------------------------

# details of [volume] resource

ubuntu@dlp ~(keystone)$
openstack metric resource show 26cfb920-601e-458d-b09c-c207a1852f8b

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | 04b6d7802d9043cbb09ceb31fd68987b                                  |
| created_by_user_id    | 1a0486c8d8664739b082ae0c97fa0cc3                                  |
| creator               | 1a0486c8d8664739b082ae0c97fa0cc3:04b6d7802d9043cbb09ceb31fd68987b |
| ended_at              | None                                                              |
| id                    | 26cfb920-601e-458d-b09c-c207a1852f8b                              |
| metrics               | volume.size: 663dde62-68ef-4f11-988b-fb890d1928a5                 |
| original_resource_id  | 26cfb920-601e-458d-b09c-c207a1852f8b                              |
| project_id            | f30cd546632e484cb24414d83207694b                                  |
| revision_end          | None                                                              |
| revision_start        | 2023-10-10T00:33:45.153931+00:00                                  |
| started_at            | 2023-10-10T00:33:45.153925+00:00                                  |
| type                  | volume                                                            |
| user_id               | 470c9323dad64bbea8fb5ecca6381f72                                  |
+-----------------------+-------------------------------------------------------------------+

# display volume size data

ubuntu@dlp ~(keystone)$
openstack metric measures show 663dde62-68ef-4f11-988b-fb890d1928a5

+---------------------------+-------------+-------+
| timestamp                 | granularity | value |
+---------------------------+-------------+-------+
| 2023-10-10T09:30:00+09:00 |       300.0 |  10.0 |
+---------------------------+-------------+-------+
Matched Content