Ubuntu 22.04
Sponsored Link

OpenStack Antelope : How to use Ceilometer (Cinder)2023/03/29

 
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                       
+--------------------------------------+----------------------------+----------------------------------
| 11987eec-fb38-4de1-a386-3d1d6001bbd3 | instance                   | e294bd7c00314facacdb46c36fb54... 
| 29b605b9-5568-5534-b3c4-470045cbcbe0 | instance_network_interface | e294bd7c00314facacdb46c36fb54... 
| 55b09db0-31af-58e5-ab82-da9b1d35c949 | instance_disk              | e294bd7c00314facacdb46c36fb54... 
+--------------------------------------+----------------------------+----------------------------------

# 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                       
+--------------------------------------+----------------------------+----------------------------------
| 11987eec-fb38-4de1-a386-3d1d6001bbd3 | instance                   | e294bd7c00314facacdb46c36fb54... 
| 29b605b9-5568-5534-b3c4-470045cbcbe0 | instance_network_interface | e294bd7c00314facacdb46c36fb54... 
| 55b09db0-31af-58e5-ab82-da9b1d35c949 | instance_disk              | e294bd7c00314facacdb46c36fb54... 
| 3a3a1349-4cee-45d6-adc1-381d6467619e | volume                     | e294bd7c00314facacdb46c36fb54... 
+--------------------------------------+----------------------------+----------------------------------

# details of [volume] resource

ubuntu@dlp ~(keystone)$
openstack metric resource show 3a3a1349-4cee-45d6-adc1-381d6467619e

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | d3dd87fb1a034f7883539a6a4f83781f                                  |
| created_by_user_id    | f88cfb33fa07437ca440ee5ef5642c95                                  |
| creator               | f88cfb33fa07437ca440ee5ef5642c95:d3dd87fb1a034f7883539a6a4f83781f |
| ended_at              | None                                                              |
| id                    | 3a3a1349-4cee-45d6-adc1-381d6467619e                              |
| metrics               | volume.size: c80fbdac-17e9-4f21-a124-f61865adff14                 |
| original_resource_id  | 3a3a1349-4cee-45d6-adc1-381d6467619e                              |
| project_id            | e294bd7c00314facacdb46c36fb54ee9                                  |
| revision_end          | None                                                              |
| revision_start        | 2023-03-29T02:28:34.523747+00:00                                  |
| started_at            | 2023-03-29T02:28:34.523741+00:00                                  |
| type                  | volume                                                            |
| user_id               | 85236576a97e492791abe70c217c8898                                  |
+-----------------------+-------------------------------------------------------------------+

# display volume size data

ubuntu@dlp ~(keystone)$
openstack metric measures show c80fbdac-17e9-4f21-a124-f61865adff14

+---------------------------+-------------+-------+
| timestamp                 | granularity | value |
+---------------------------+-------------+-------+
| 2023-03-29T11:25:00+09:00 |       300.0 |  10.0 |
+---------------------------+-------------+-------+
Matched Content