CentOS Stream 9
Sponsored Link

OpenStack Antelope : How to use Ceilometer (Cinder)2023/04/20

 
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                       
+--------------------------------------+----------------------------+----------------------------------
| 284a5b69-7b76-49c3-8180-c9b22284d429 | instance                   | 40aa0807595447f0bd8d5b2dbfa18... 
| 9e9a6284-5040-5642-ba3b-25542d7f87ac | instance_disk              | 40aa0807595447f0bd8d5b2dbfa18... 
| 783023d9-7b04-538f-9a5e-74098a7da99a | instance_network_interface | 40aa0807595447f0bd8d5b2dbfa18... 
+--------------------------------------+----------------------------+----------------------------------

# 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                       
+--------------------------------------+----------------------------+----------------------------------
| 284a5b69-7b76-49c3-8180-c9b22284d429 | instance                   | 40aa0807595447f0bd8d5b2dbfa18... 
| 9e9a6284-5040-5642-ba3b-25542d7f87ac | instance_disk              | 40aa0807595447f0bd8d5b2dbfa18... 
| 783023d9-7b04-538f-9a5e-74098a7da99a | instance_network_interface | 40aa0807595447f0bd8d5b2dbfa18... 
| 0c22c348-b697-4791-ac73-cdcbb5f814fa | volume                     | 40aa0807595447f0bd8d5b2dbfa18... 
+--------------------------------------+----------------------------+----------------------------------

# details of the resource

[cent@dlp ~(keystone)]$
openstack metric resource show 0c22c348-b697-4791-ac73-cdcbb5f814fa

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | 6d680c2574034967ab496a59d1319a65                                  |
| created_by_user_id    | 372e97ed646e48ddb41c769a446d2094                                  |
| creator               | 372e97ed646e48ddb41c769a446d2094:6d680c2574034967ab496a59d1319a65 |
| ended_at              | None                                                              |
| id                    | 0c22c348-b697-4791-ac73-cdcbb5f814fa                              |
| metrics               | volume.size: c426b910-de86-4810-be7e-d78d1eec1172                 |
| original_resource_id  | 0c22c348-b697-4791-ac73-cdcbb5f814fa                              |
| project_id            | 40aa0807595447f0bd8d5b2dbfa1839b                                  |
| revision_end          | None                                                              |
| revision_start        | 2023-04-20T01:31:34.171327+00:00                                  |
| started_at            | 2023-04-20T01:31:34.171321+00:00                                  |
| type                  | volume                                                            |
| user_id               | 3c87f0d4e2e6413aa110a4240357cd97                                  |
+-----------------------+-------------------------------------------------------------------+

# display volume size data

[cent@dlp ~(keystone)]$
openstack metric measures show e9e32c9d-d6ca-4f5d-9a87-b5594cbcd214

+---------------------------+-------------+-------+
| timestamp                 | granularity | value |
+---------------------------+-------------+-------+
| 2023-04-20T10:30:00+09:00 |       300.0 |  10.0 |
+---------------------------+-------------+-------+
Matched Content