Ubuntu 22.04
Sponsored Link

OpenStack Yoga : How to use Ceilometer (Cinder)2022/05/07

 
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  httpd     |     |     Neutron Server    |     |      Nova Compute     |
|  Keystone   Glance    |     |      OVN-Northd       |     |      Open vSwitch     |
|  Nova API  Cinder API |     |     Cinder Volume     |     |   OVN Metadata Agent  |
|                       |     |     Gnocchi httpd     |     |     OVN-Controller    |
|                       |     |   Ceilometer Central  |     |   Ceilometer Compute  |
+-----------------------+     +-----------------------+     +-----------------------+

[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                       
+--------------------------------------+----------------------------+----------------------------------
| 6781b9c7-19c6-4419-a910-d0ae43c7526c | instance                   | 66102fdb888d4556a59dcff8b631f... 
| e540d3c4-7e04-5ef8-8399-5b66d78d1056 | instance_network_interface | 66102fdb888d4556a59dcff8b631f... 
| a302db56-ba64-5f36-9182-f3a9572aab1d | instance_disk              | 66102fdb888d4556a59dcff8b631f... 
+--------------------------------------+----------------------------+----------------------------------

# 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                       
+--------------------------------------+----------------------------+----------------------------------
| 6781b9c7-19c6-4419-a910-d0ae43c7526c | instance                   | 66102fdb888d4556a59dcff8b631f... 
| e540d3c4-7e04-5ef8-8399-5b66d78d1056 | instance_network_interface | 66102fdb888d4556a59dcff8b631f... 
| a302db56-ba64-5f36-9182-f3a9572aab1d | instance_disk              | 66102fdb888d4556a59dcff8b631f... 
| 9f015020-ebb8-4e67-a6b3-50e5108e4b92 | volume                     | 66102fdb888d4556a59dcff8b631f... 
+--------------------------------------+----------------------------+----------------------------------

# details of [volume] resource

ubuntu@dlp ~(keystone)$
openstack metric resource show 9f015020-ebb8-4e67-a6b3-50e5108e4b92

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | c1c4d9a5313f43bd9f6f555e2d34ab28                                  |
| created_by_user_id    | 66d094f65ddd49ebb6e27f48ed2c6448                                  |
| creator               | 66d094f65ddd49ebb6e27f48ed2c6448:c1c4d9a5313f43bd9f6f555e2d34ab28 |
| ended_at              | None                                                              |
| id                    | 9f015020-ebb8-4e67-a6b3-50e5108e4b92                              |
| metrics               | volume.size: a199ef6a-3ffb-490a-bc6d-a83da6e9675f                 |
| original_resource_id  | 9f015020-ebb8-4e67-a6b3-50e5108e4b92                              |
| project_id            | 66102fdb888d4556a59dcff8b631ffdf                                  |
| revision_end          | None                                                              |
| revision_start        | 2022-05-05T15:48:05.629690+00:00                                  |
| started_at            | 2022-05-05T15:48:05.629682+00:00                                  |
| type                  | volume                                                            |
| user_id               | 74a373164921492ca35d32fea0fd2d86                                  |
+-----------------------+-------------------------------------------------------------------+

# display volume size data

ubuntu@dlp ~(keystone)$
openstack metric measures show a199ef6a-3ffb-490a-bc6d-a83da6e9675f

+---------------------------+-------------+-------+
| timestamp                 | granularity | value |
+---------------------------+-------------+-------+
| 2022-05-05T15:45:00+00:00 |       300.0 |  10.0 |
+---------------------------+-------------+-------+
Matched Content