CentOS Stream 8
Sponsored Link

OpenStack Victoria : How to use Ceilometer (Cinder)2021/03/30

 
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
+-----------+-----------+   +-----------+-----------+   +-----------+-----------+
|    [ Control Node ]   |   |    [ Network Node ]   |   |    [ Compute Node ]   |
|                       |   |                       |   |                       |
|  MariaDB    RabbitMQ  |   |      Open vSwitch     |   |        Libvirt        |
|  Memcached  httpd     |   |     Neutron Server    |   |     Nova Compute      |
|  Keystone   Glance    |   |       OVN-Northd      |   |      Open vSwitch     |
|  Nova API             |   |     Cinder Volume     |   |   OVN Metadata Agent  |
|  Cinder API           |   |      iSCSI Target     |   |     OVN-Controller    |
|  Gnocchi              |   |     Heat API/Engine   |   |   Ceilometer Compute  |
|  Ceilometer Central   |   |                       |   |                       |
+-----------------------+   +-----------------------+   +-----------------------+

[1] Change settings for Cinder service to enable Telemetry data collention 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@10.0.0.30
[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                        
+--------------------------------------+----------------------------+-----------------------------------
| da1c8adc-4733-4ee5-a654-49d652a6aaa3 | instance                   | f1f04d774d2141fb9acabd28d0e00c... 
| 21b1221b-a0db-5f1c-8c92-ae02f7064202 | instance_disk              | f1f04d774d2141fb9acabd28d0e00c... 
| 23721353-784e-571f-9f47-fecb17e1c51d | instance_network_interface | f1f04d774d2141fb9acabd28d0e00c... 
+--------------------------------------+----------------------------+-----------------------------------

# 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                       
+--------------------------------------+----------------------------+----------------------------------
| da1c8adc-4733-4ee5-a654-49d652a6aaa3 | instance                   | f1f04d774d2141fb9acabd28d0e00... 
| 21b1221b-a0db-5f1c-8c92-ae02f7064202 | instance_disk              | f1f04d774d2141fb9acabd28d0e00... 
| 23721353-784e-571f-9f47-fecb17e1c51d | instance_network_interface | f1f04d774d2141fb9acabd28d0e00... 
| 80668d46-d3a5-443a-aaf1-e2e9a1879dd8 | volume                     | f1f04d774d2141fb9acabd28d0e00... 
+--------------------------------------+----------------------------+----------------------------------

# details of the resource

[cent@dlp ~(keystone)]$
openstack metric resource show 80668d46-d3a5-443a-aaf1-e2e9a1879dd8

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | affa3a6446154e37adfd233c437bacc1                                  |
| created_by_user_id    | 66a09b5dee7b451fb4cb4216ef7067be                                  |
| creator               | 66a09b5dee7b451fb4cb4216ef7067be:affa3a6446154e37adfd233c437bacc1 |
| ended_at              | None                                                              |
| id                    | 80668d46-d3a5-443a-aaf1-e2e9a1879dd8                              |
| metrics               | volume.size: 37992e16-c150-421c-b2cb-ccf4968ed748                 |
| original_resource_id  | 80668d46-d3a5-443a-aaf1-e2e9a1879dd8                              |
| project_id            | f1f04d774d2141fb9acabd28d0e00c33                                  |
| revision_end          | None                                                              |
| revision_start        | 2021-03-30T07:31:23.144140+00:00                                  |
| started_at            | 2021-03-30T07:31:23.144134+00:00                                  |
| type                  | volume                                                            |
| user_id               | e08c35de3b6746bd9518c97f7068a71e                                  |
+-----------------------+-------------------------------------------------------------------+

# display volume size data

[cent@dlp ~(keystone)]$
openstack metric measures show 37992e16-c150-421c-b2cb-ccf4968ed748

+---------------------------+-------------+-------+
| timestamp                 | granularity | value |
+---------------------------+-------------+-------+
| 2021-03-30T16:30:00+09:00 |       300.0 |  10.0 |
+---------------------------+-------------+-------+
Matched Content