Ubuntu 22.04
Sponsored Link

OpenStack Caracal : How to use Ceilometer (Cinder)2024/04/11

 
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  |  |  Neutron L2/L3 Agent  |  |        Libvirt        |
|  Memcached  Nginx     |  |   Neutron Metadata    |  |      Nova Compute     |
|  Keystone   httpd     |  |     Open vSwitch      |  |    Neutron L2 Agent   |
|  Glance     Nova API  |  |     iSCSI Target      |  |      Open vSwitch     |
|  Neutron Server       |  |     Cinder Volume     |  |   Ceilometer Compute  |
|  Neutron Metadata     |  |     httpd  Gnocchi    |  |                       |
|  Cinder API           |  |   Ceilometer Central  |  |                       |
+-----------------------+  +-----------------------+  +-----------------------+

[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 last line

[oslo_messaging_notifications]
driver = messagingv2
transport_url = rabbit://openstack:password@dlp.srv.world:5672
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 | user_id  | original_resource_id | started_at | ended_at | revision_start | revision_end | creator       |
+----------+----------+------------+----------+----------------------+------------+----------+----------------+--------------+---------------+
| 1a96a3e7 | instance | 2bcdd2fecf | e6828434 | instance-00000001-   | 2024-04-   | None     | 2024-04-       | None         | 470c2a45c1fc4 |
| -c719-   | _network | 1d4a8c8faf | 92a44937 | e7feb65c-1482-48a9-  | 11T04:22:0 |          | 11T04:22:06.61 |              | fcf9f921d2a20 |
| 549e-    | _interfa | 87f1232cf3 | b745ef94 | 9d45-e74196a5ea92-   | 6.611445+0 |          | 1451+00:00     |              | fd7982:c9a28e |
| b2bb-    | ce       | 65         | 5bfacf70 | tapc1f40f45-6f       | 0:00       |          |                |              | 6f0f794ccf889 |
| 68aa936a |          |            |          |                      |            |          |                |              | c115bb9c2872c |
| 369f     |          |            |          |                      |            |          |                |              |               |
| 9702027c | instance | 2bcdd2fecf | e6828434 | e7feb65c-1482-48a9-  | 2024-04-   | None     | 2024-04-       | None         | 470c2a45c1fc4 |
| -b96a-   | _disk    | 1d4a8c8faf | 92a44937 | 9d45-e74196a5ea92-   | 11T04:22:0 |          | 11T04:22:06.68 |              | fcf9f921d2a20 |
| 552a-    |          | 87f1232cf3 | b745ef94 | vda                  | 6.686566+0 |          | 6572+00:00     |              | fd7982:c9a28e |
| a3ec-    |          | 65         | 5bfacf70 |                      | 0:00       |          |                |              | 6f0f794ccf889 |
| 774ca64f |          |            |          |                      |            |          |                |              | c115bb9c2872c |
| 422c     |          |            |          |                      |            |          |                |              |               |
| e7feb65c | instance | 2bcdd2fecf | e6828434 | e7feb65c-1482-48a9-  | 2024-04-   | None     | 2024-04-       | None         | 470c2a45c1fc4 |
| -1482-   |          | 1d4a8c8faf | 92a44937 | 9d45-e74196a5ea92    | 11T04:22:0 |          | 11T04:22:06.78 |              | fcf9f921d2a20 |
| 48a9-    |          | 87f1232cf3 | b745ef94 |                      | 6.785588+0 |          | 5593+00:00     |              | fd7982:c9a28e |
| 9d45-    |          | 65         | 5bfacf70 |                      | 0:00       |          |                |              | 6f0f794ccf889 |
| e74196a5 |          |            |          |                      |            |          |                |              | c115bb9c2872c |
| ea92     |          |            |          |                      |            |          |                |              |               |
+----------+----------+------------+----------+----------------------+------------+----------+----------------+--------------+---------------+

# 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 | user_id  | original_resource_id | started_at | ended_at | revision_start | revision_end | creator       |
+----------+----------+------------+----------+----------------------+------------+----------+----------------+--------------+---------------+
| 1a96a3e7 | instance | 2bcdd2fecf | e6828434 | instance-00000001-   | 2024-04-   | None     | 2024-04-       | None         | 470c2a45c1fc4 |
| -c719-   | _network | 1d4a8c8faf | 92a44937 | e7feb65c-1482-48a9-  | 11T04:22:0 |          | 11T04:22:06.61 |              | fcf9f921d2a20 |
| 549e-    | _interfa | 87f1232cf3 | b745ef94 | 9d45-e74196a5ea92-   | 6.611445+0 |          | 1451+00:00     |              | fd7982:c9a28e |
| b2bb-    | ce       | 65         | 5bfacf70 | tapc1f40f45-6f       | 0:00       |          |                |              | 6f0f794ccf889 |
| 68aa936a |          |            |          |                      |            |          |                |              | c115bb9c2872c |
| 369f     |          |            |          |                      |            |          |                |              |               |
| 9702027c | instance | 2bcdd2fecf | e6828434 | e7feb65c-1482-48a9-  | 2024-04-   | None     | 2024-04-       | None         | 470c2a45c1fc4 |
| -b96a-   | _disk    | 1d4a8c8faf | 92a44937 | 9d45-e74196a5ea92-   | 11T04:22:0 |          | 11T04:22:06.68 |              | fcf9f921d2a20 |
| 552a-    |          | 87f1232cf3 | b745ef94 | vda                  | 6.686566+0 |          | 6572+00:00     |              | fd7982:c9a28e |
| a3ec-    |          | 65         | 5bfacf70 |                      | 0:00       |          |                |              | 6f0f794ccf889 |
| 774ca64f |          |            |          |                      |            |          |                |              | c115bb9c2872c |
| 422c     |          |            |          |                      |            |          |                |              |               |
| e7feb65c | instance | 2bcdd2fecf | e6828434 | e7feb65c-1482-48a9-  | 2024-04-   | None     | 2024-04-       | None         | 470c2a45c1fc4 |
| -1482-   |          | 1d4a8c8faf | 92a44937 | 9d45-e74196a5ea92    | 11T04:22:0 |          | 11T04:22:06.78 |              | fcf9f921d2a20 |
| 48a9-    |          | 87f1232cf3 | b745ef94 |                      | 6.785588+0 |          | 5593+00:00     |              | fd7982:c9a28e |
| 9d45-    |          | 65         | 5bfacf70 |                      | 0:00       |          |                |              | 6f0f794ccf889 |
| e74196a5 |          |            |          |                      |            |          |                |              | c115bb9c2872c |
| ea92     |          |            |          |                      |            |          |                |              |               |
| ae09164d | volume   | 2bcdd2fecf | e6828434 | ae09164d-dcdb-4af1-  | 2024-04-   | None     | 2024-04-       | None         | 470c2a45c1fc4 |
| -dcdb-   |          | 1d4a8c8faf | 92a44937 | ba6c-41c9e30a6e82    | 11T04:38:5 |          | 11T04:38:51.39 |              | fcf9f921d2a20 |
| 4af1-    |          | 87f1232cf3 | b745ef94 |                      | 1.391289+0 |          | 1294+00:00     |              | fd7982:c9a28e |
| ba6c-    |          | 65         | 5bfacf70 |                      | 0:00       |          |                |              | 6f0f794ccf889 |
| 41c9e30a |          |            |          |                      |            |          |                |              | c115bb9c2872c |
| 6e82     |          |            |          |                      |            |          |                |              |               |
+----------+----------+------------+----------+----------------------+------------+----------+----------------+--------------+---------------+

# details of [volume] resource

ubuntu@dlp ~(keystone)$
openstack metric resource show ae09164d-dcdb-4af1-ba6c-41c9e30a6e82

+-----------------------+------------------------------------------------------+
| Field                 | Value                                                |
+-----------------------+------------------------------------------------------+
| created_by_project_id | c9a28e6f0f794ccf889c115bb9c2872c                     |
| created_by_user_id    | 470c2a45c1fc4fcf9f921d2a20fd7982                     |
| creator               | 470c2a45c1fc4fcf9f921d2a20fd7982:c9a28e6f0f794ccf889 |
|                       | c115bb9c2872c                                        |
| ended_at              | None                                                 |
| id                    | ae09164d-dcdb-4af1-ba6c-41c9e30a6e82                 |
| metrics               | volume.size: e22236e9-e16a-450f-8dc9-aa81c897de7f    |
| original_resource_id  | ae09164d-dcdb-4af1-ba6c-41c9e30a6e82                 |
| project_id            | 2bcdd2fecf1d4a8c8faf87f1232cf365                     |
| revision_end          | None                                                 |
| revision_start        | 2024-04-11T04:38:51.391294+00:00                     |
| started_at            | 2024-04-11T04:38:51.391289+00:00                     |
| type                  | volume                                               |
| user_id               | e682843492a44937b745ef945bfacf70                     |
+-----------------------+------------------------------------------------------+

# display volume size data

ubuntu@dlp ~(keystone)$
openstack metric measures show e22236e9-e16a-450f-8dc9-aa81c897de7f

+---------------------------+-------------+-------+
| timestamp                 | granularity | value |
+---------------------------+-------------+-------+
| 2024-04-11T13:35:00+09:00 |       300.0 |  10.0 |
+---------------------------+-------------+-------+
Matched Content