Ubuntu 24.04
Sponsored Link

OpenStack Caracal : How to use Ceilometer (Cinder)2024/05/23

 

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       |
+----------+----------+------------+----------+----------------------+------------+----------+----------------+--------------+---------------+
| f69d1834 | instance | 18ede7365b | b9371d01 | 7fbc24c1-c0d1-43d6-  | 2024-05-   | None     | 2024-05-       | None         | 65be1bdf8db24 |
| -9dc1-   | _disk    | dc430093e8 | 5e0d43dc | 87aa-68df83597b57-   | 23T01:17:1 |          | 23T01:17:17.29 |              | 41e8670bf362e |
| 544c-    |          | fd4a90f773 | a74f2916 | vda                  | 7.291969+0 |          | 1974+00:00     |              | 844176:ab9749 |
| 82df-    |          | 69         | 1448ffd2 |                      | 0:00       |          |                |              | e59bdb48e4807 |
| 82a2b49c |          |            |          |                      |            |          |                |              | a18abb83c9f99 |
| ad84     |          |            |          |                      |            |          |                |              |               |
| a9867d26 | instance | 18ede7365b | b9371d01 | instance-00000002-   | 2024-05-   | None     | 2024-05-       | None         | 65be1bdf8db24 |
| -81a4-   | _network | dc430093e8 | 5e0d43dc | 7fbc24c1-c0d1-43d6-  | 23T01:17:1 |          | 23T01:17:17.41 |              | 41e8670bf362e |
| 5eca-    | _interfa | fd4a90f773 | a74f2916 | 87aa-68df83597b57-   | 7.413053+0 |          | 3059+00:00     |              | 844176:ab9749 |
| b871-    | ce       | 69         | 1448ffd2 | tape810be8a-45       | 0:00       |          |                |              | e59bdb48e4807 |
| f50efe37 |          |            |          |                      |            |          |                |              | a18abb83c9f99 |
| 4561     |          |            |          |                      |            |          |                |              |               |
| 7fbc24c1 | instance | 18ede7365b | b9371d01 | 7fbc24c1-c0d1-43d6-  | 2024-05-   | None     | 2024-05-       | None         | 65be1bdf8db24 |
| -c0d1-   |          | dc430093e8 | 5e0d43dc | 87aa-68df83597b57    | 23T01:17:1 |          | 23T01:17:17.42 |              | 41e8670bf362e |
| 43d6-    |          | fd4a90f773 | a74f2916 |                      | 7.423541+0 |          | 3545+00:00     |              | 844176:ab9749 |
| 87aa-    |          | 69         | 1448ffd2 |                      | 0:00       |          |                |              | e59bdb48e4807 |
| 68df8359 |          |            |          |                      |            |          |                |              | a18abb83c9f99 |
| 7b57     |          |            |          |                      |            |          |                |              |               |
+----------+----------+------------+----------+----------------------+------------+----------+----------------+--------------+---------------+

# 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       |
+----------+----------+------------+----------+----------------------+------------+----------+----------------+--------------+---------------+
| f69d1834 | instance | 18ede7365b | b9371d01 | 7fbc24c1-c0d1-43d6-  | 2024-05-   | None     | 2024-05-       | None         | 65be1bdf8db24 |
| -9dc1-   | _disk    | dc430093e8 | 5e0d43dc | 87aa-68df83597b57-   | 23T01:17:1 |          | 23T01:17:17.29 |              | 41e8670bf362e |
| 544c-    |          | fd4a90f773 | a74f2916 | vda                  | 7.291969+0 |          | 1974+00:00     |              | 844176:ab9749 |
| 82df-    |          | 69         | 1448ffd2 |                      | 0:00       |          |                |              | e59bdb48e4807 |
| 82a2b49c |          |            |          |                      |            |          |                |              | a18abb83c9f99 |
| ad84     |          |            |          |                      |            |          |                |              |               |
| a9867d26 | instance | 18ede7365b | b9371d01 | instance-00000002-   | 2024-05-   | None     | 2024-05-       | None         | 65be1bdf8db24 |
| -81a4-   | _network | dc430093e8 | 5e0d43dc | 7fbc24c1-c0d1-43d6-  | 23T01:17:1 |          | 23T01:17:17.41 |              | 41e8670bf362e |
| 5eca-    | _interfa | fd4a90f773 | a74f2916 | 87aa-68df83597b57-   | 7.413053+0 |          | 3059+00:00     |              | 844176:ab9749 |
| b871-    | ce       | 69         | 1448ffd2 | tape810be8a-45       | 0:00       |          |                |              | e59bdb48e4807 |
| f50efe37 |          |            |          |                      |            |          |                |              | a18abb83c9f99 |
| 4561     |          |            |          |                      |            |          |                |              |               |
| 7fbc24c1 | instance | 18ede7365b | b9371d01 | 7fbc24c1-c0d1-43d6-  | 2024-05-   | None     | 2024-05-       | None         | 65be1bdf8db24 |
| -c0d1-   |          | dc430093e8 | 5e0d43dc | 87aa-68df83597b57    | 23T01:17:1 |          | 23T01:17:17.42 |              | 41e8670bf362e |
| 43d6-    |          | fd4a90f773 | a74f2916 |                      | 7.423541+0 |          | 3545+00:00     |              | 844176:ab9749 |
| 87aa-    |          | 69         | 1448ffd2 |                      | 0:00       |          |                |              | e59bdb48e4807 |
| 68df8359 |          |            |          |                      |            |          |                |              | a18abb83c9f99 |
| 7b57     |          |            |          |                      |            |          |                |              |               |
| f3515141 | volume   | 18ede7365b | b9371d01 | f3515141-8e83-441d-  | 2024-05-   | None     | 2024-05-       | None         | 65be1bdf8db24 |
| -8e83-   |          | dc430093e8 | 5e0d43dc | b7e2-0136d8e1c0a7    | 23T01:30:2 |          | 23T01:30:20.10 |              | 41e8670bf362e |
| 441d-    |          | fd4a90f773 | a74f2916 |                      | 0.100258+0 |          | 0263+00:00     |              | 844176:ab9749 |
| b7e2-    |          | 69         | 1448ffd2 |                      | 0:00       |          |                |              | e59bdb48e4807 |
| 0136d8e1 |          |            |          |                      |            |          |                |              | a18abb83c9f99 |
| c0a7     |          |            |          |                      |            |          |                |              |               |
+----------+----------+------------+----------+----------------------+------------+----------+----------------+--------------+---------------+

# details of [volume] resource

ubuntu@dlp ~(keystone)$
openstack metric resource show f3515141-8e83-441d-b7e2-0136d8e1c0a7

+-----------------------+------------------------------------------------------+
| Field                 | Value                                                |
+-----------------------+------------------------------------------------------+
| created_by_project_id | ab9749e59bdb48e4807a18abb83c9f99                     |
| created_by_user_id    | 65be1bdf8db2441e8670bf362e844176                     |
| creator               | 65be1bdf8db2441e8670bf362e844176:ab9749e59bdb48e4807 |
|                       | a18abb83c9f99                                        |
| ended_at              | None                                                 |
| id                    | f3515141-8e83-441d-b7e2-0136d8e1c0a7                 |
| metrics               | volume.size: 13ee353d-897b-469f-96b9-8de2e02039f9    |
| original_resource_id  | f3515141-8e83-441d-b7e2-0136d8e1c0a7                 |
| project_id            | 18ede7365bdc430093e8fd4a90f77369                     |
| revision_end          | None                                                 |
| revision_start        | 2024-05-23T01:30:20.100263+00:00                     |
| started_at            | 2024-05-23T01:30:20.100258+00:00                     |
| type                  | volume                                               |
| user_id               | b9371d015e0d43dca74f29161448ffd2                     |
+-----------------------+------------------------------------------------------+

# display volume size data

ubuntu@dlp ~(keystone)$
openstack metric measures show 13ee353d-897b-469f-96b9-8de2e02039f9

+---------------------------+-------------+-------+
| timestamp                 | granularity | value |
+---------------------------+-------------+-------+
| 2024-05-23T01:30:00+00:00 |       300.0 |  10.0 |
+---------------------------+-------------+-------+
Matched Content