Ubuntu 20.04
Sponsored Link

OpenStack Ussuri : How to use Ceilometer (Cinder)2020/06/18

 
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 example to display metrics and meters.
# list resources

ubuntu@dlp ~(keystone)$
openstack metric resource list

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| 2dde6728-0e9a-4bd1-b10a-196162ec5e2a | instance                   | eaa8de359ae0451d944a6401e688f... 
| f33a56c8-468d-5973-a515-a879a8ce8a64 | instance_disk              | eaa8de359ae0451d944a6401e688f... 
| 2b500dc3-e441-5ace-8600-15761d009452 | instance_network_interface | eaa8de359ae0451d944a6401e688f... 
+--------------------------------------+----------------------------+----------------------------------

# test to create a volume

ubuntu@dlp ~(keystone)$
openstack volume create --size 10 disk01

# list resources

ubuntu@dlp ~(keystone)$
openstack metric resource list

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| 2dde6728-0e9a-4bd1-b10a-196162ec5e2a | instance                   | eaa8de359ae0451d944a6401e688f730 
| f33a56c8-468d-5973-a515-a879a8ce8a64 | instance_disk              | eaa8de359ae0451d944a6401e688f730 
| 2b500dc3-e441-5ace-8600-15761d009452 | instance_network_interface | eaa8de359ae0451d944a6401e688f730 
| b89264a5-71b4-4705-8508-c6bd0d300bc2 | volume                     | eaa8de359ae0451d944a6401e688f730 
+--------------------------------------+----------------------------+----------------------------------

# details of [volume] resource

ubuntu@dlp ~(keystone)$
openstack metric resource show b89264a5-71b4-4705-8508-c6bd0d300bc2

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | c0e098a54a4640caa9004fb8f500f554                                  |
| created_by_user_id    | 3d1f14e0843940dfb5afaeee1ec45507                                  |
| creator               | 3d1f14e0843940dfb5afaeee1ec45507:c0e098a54a4640caa9004fb8f500f554 |
| ended_at              | None                                                              |
| id                    | b89264a5-71b4-4705-8508-c6bd0d300bc2                              |
| metrics               | volume.size: e77fbac2-0b09-4132-8d8f-3065253106ce                 |
| original_resource_id  | b89264a5-71b4-4705-8508-c6bd0d300bc2                              |
| project_id            | eaa8de359ae0451d944a6401e688f730                                  |
| revision_end          | None                                                              |
| revision_start        | 2020-06-18T05:17:26.444443+00:00                                  |
| started_at            | 2020-06-18T05:17:26.444436+00:00                                  |
| type                  | volume                                                            |
| user_id               | 2a1e722c971c45d384efe048155d89c7                                  |
+-----------------------+-------------------------------------------------------------------+

# display volume size data

ubuntu@dlp ~(keystone)$
openstack metric measures show e77fbac2-0b09-4132-8d8f-3065253106ce

+---------------------------+-------------+-------+
| timestamp                 | granularity | value |
+---------------------------+-------------+-------+
| 2020-06-18T14:15:00+09:00 |       300.0 |  10.0 |
+---------------------------+-------------+-------+
Matched Content