Ubuntu 18.04
Sponsored Link

OpenStack Rocky : How to use Ceilometer (Cinder)2018/09/18

 
This is how to use OpenStack Telemetry Service (Ceilometer) for Cinder service.
This example is based on the emvironment 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                       
+--------------------------------------+----------------------------+----------------------------------
| e402a282-c5ae-4532-ad08-0a2f0d7803ac | instance                   | 5f54b0ad76274f06b13f29458cc1c... 
| 79195be1-3b66-4601-8401-489f4d7b4ee5 | instance                   | 5f54b0ad76274f06b13f29458cc1c... 
| eb34c91e-e69b-5bc5-b01b-97a0ee76832d | instance_network_interface | 5f54b0ad76274f06b13f29458cc1c... 
| 9887d1b9-c33e-5346-bc51-712db41a50f6 | instance_disk              | 5f54b0ad76274f06b13f29458cc1c... 
+--------------------------------------+----------------------------+----------------------------------

# 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                       
+--------------------------------------+----------------------------+----------------------------------
| e402a282-c5ae-4532-ad08-0a2f0d7803ac | instance                   | 5f54b0ad76274f06b13f29458cc1c... 
| 79195be1-3b66-4601-8401-489f4d7b4ee5 | instance                   | 5f54b0ad76274f06b13f29458cc1c... 
| eb34c91e-e69b-5bc5-b01b-97a0ee76832d | instance_network_interface | 5f54b0ad76274f06b13f29458cc1c... 
| 9887d1b9-c33e-5346-bc51-712db41a50f6 | instance_disk              | 5f54b0ad76274f06b13f29458cc1c... 
| 28baad07-9887-4a18-a9a2-1b683f445c7e | volume                     | 5f54b0ad76274f06b13f29458cc1c... 
+--------------------------------------+----------------------------+----------------------------------

# details of volume resource

ubuntu@dlp ~(keystone)$
openstack metric resource show 28baad07-9887-4a18-a9a2-1b683f445c7e

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | aaeee626080841a491235fb06e77f10c                                  |
| created_by_user_id    | 1473e02cb8754787a0a9e47dd7d8e0ce                                  |
| creator               | 1473e02cb8754787a0a9e47dd7d8e0ce:aaeee626080841a491235fb06e77f10c |
| ended_at              | None                                                              |
| id                    | 28baad07-9887-4a18-a9a2-1b683f445c7e                              |
| metrics               | volume.size: 9e82f0a9-90b4-4ebc-acab-e48a6289f106                 |
| original_resource_id  | 28baad07-9887-4a18-a9a2-1b683f445c7e                              |
| project_id            | 5f54b0ad76274f06b13f29458cc1c036                                  |
| revision_end          | None                                                              |
| revision_start        | 2018-09-18T08:06:25.514476+00:00                                  |
| started_at            | 2018-09-18T08:06:25.514453+00:00                                  |
| type                  | volume                                                            |
| user_id               | 54951d6863024516a19ed9bda53be12f                                  |
+-----------------------+-------------------------------------------------------------------+

# display volume size data

ubuntu@dlp ~(keystone)$
openstack metric measures show 9e82f0a9-90b4-4ebc-acab-e48a6289f106

+---------------------------+-------------+-------+
| timestamp                 | granularity | value |
+---------------------------+-------------+-------+
| 2018-09-18T17:05:00+09:00 |       300.0 |  10.0 |
+---------------------------+-------------+-------+
Matched Content