Ubuntu 20.04
Sponsored Link

OpenStack Victoria : How to use Ceilometer (Cinder)2020/10/22

 
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  |   |      Linux Bridge     |   |        Libvirt        |
|  Memcached  httpd     |   |        L2 Agent       |   |     Nova Compute      |
|  Keystone   Glance    |   |        L3 Agent       |   |      Linux Bridge     |
|  Nova_API  Cinder_API |   |     Metadata Agent    |   |        L2 Agent       |
|  Neutron Server       |   |     Cinder Volume     |   |   Ceilometer Compute  |
|  Metadata Agent       |   |        Heat API       |   |                       |
|                       |   |      Heat Engine      |   |                       |
|                       |   |    Gnocchi  httpd     |   |                       |
|                       |   |   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 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                       
+--------------------------------------+----------------------------+----------------------------------
| 10abf4e3-d5d9-4b57-a5a0-7cb767442dcc | instance                   | 6c44eafd4f614985bf74b94f2aee8... 
| c96d50ae-df9a-58f4-acb8-d3fbfad117dd | instance_disk              | 6c44eafd4f614985bf74b94f2aee8... 
| 103be51a-14ae-5fc4-8f0b-9b7458fc1bc1 | instance_network_interface | 6c44eafd4f614985bf74b94f2aee8... 
+--------------------------------------+----------------------------+----------------------------------

# 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                       
+--------------------------------------+----------------------------+----------------------------------
| 10abf4e3-d5d9-4b57-a5a0-7cb767442dcc | instance                   | 6c44eafd4f614985bf74b94f2aee8... 
| c96d50ae-df9a-58f4-acb8-d3fbfad117dd | instance_disk              | 6c44eafd4f614985bf74b94f2aee8... 
| 103be51a-14ae-5fc4-8f0b-9b7458fc1bc1 | instance_network_interface | 6c44eafd4f614985bf74b94f2aee8... 
| 67abc6ef-5b6f-4c30-9a01-cdb62f351212 | volume                     | 6c44eafd4f614985bf74b94f2aee8... 
+--------------------------------------+----------------------------+----------------------------------

# details of [volume] resource

ubuntu@dlp ~(keystone)$
openstack metric resource show 67abc6ef-5b6f-4c30-9a01-cdb62f351212

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | 37197271a1954ddb90207a95d5f46488                                  |
| created_by_user_id    | a954b69f9b8345d9a797abbc0a949108                                  |
| creator               | a954b69f9b8345d9a797abbc0a949108:37197271a1954ddb90207a95d5f46488 |
| ended_at              | None                                                              |
| id                    | 67abc6ef-5b6f-4c30-9a01-cdb62f351212                              |
| metrics               | volume.size: 3b6e4bac-0cf8-4304-af7e-a6776494fb6f                 |
| original_resource_id  | 67abc6ef-5b6f-4c30-9a01-cdb62f351212                              |
| project_id            | 6c44eafd4f614985bf74b94f2aee82fb                                  |
| revision_end          | None                                                              |
| revision_start        | 2020-10-22T01:41:16.549231+00:00                                  |
| started_at            | 2020-10-22T01:41:16.549224+00:00                                  |
| type                  | volume                                                            |
| user_id               | a13cfae0e5eb466fae71a636a6ffb6b4                                  |
+-----------------------+-------------------------------------------------------------------+

# display volume size data

ubuntu@dlp ~(keystone)$
openstack metric measures show 3b6e4bac-0cf8-4304-af7e-a6776494fb6f

+---------------------------+-------------+-------+
| timestamp                 | granularity | value |
+---------------------------+-------------+-------+
| 2020-10-22T10:40:00+09:00 |       300.0 |  10.0 |
+---------------------------+-------------+-------+
Matched Content