CentOS Stream 9
Sponsored Link

OpenStack Caracal : Ceilometer 利用方法 (Cinder)2024/08/08

 

OpenStack Telemetry Service (Ceilometer) の利用方法です。

当例では以下のような環境を例に Ceilometer サービスをインストールしています。

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

[1] Block Storage サービスの各種データ収集を有効にするには、Cinder を以下のように設定します。
Cinder 関連サービスが稼働する全ノードで設定変更します。
[root@dlp ~(keystone)]#
vi /etc/cinder/cinder.conf
# 最終行へ追記

[oslo_messaging_notifications]
driver = messagingv2
transport_url = rabbit://openstack:password@dlp.srv.world
[root@dlp ~(keystone)]#
systemctl restart openstack-cinder-api openstack-cinder-scheduler

[2] 任意のユーザーでボリュームを作成した場合に収集されるデータの表示例です。
# リソース一覧

[cent@dlp ~(keystone)]$
openstack metric resource list

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| 1d0c2140-098d-4a1a-a705-82d7755d7c84 | instance                   | 03a31c43ede44dcbaacb05c870920... 
| 1e69e83f-7283-58a2-a1f2-18093aad665d | instance_network_interface | 03a31c43ede44dcbaacb05c870920... 
| 5770e056-a76c-5bba-9b71-aef9fdefd317 | instance_disk              | 03a31c43ede44dcbaacb05c870920... 
+--------------------------------------+----------------------------+----------------------------------

# テストとしてボリューム作成

[cent@dlp ~(keystone)]$
openstack volume create --size 10 disk01

# リソース一覧

[cent@dlp ~(keystone)]$
openstack metric resource list

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| 1d0c2140-098d-4a1a-a705-82d7755d7c84 | instance                   | 03a31c43ede44dcbaacb05c870920... 
| 1e69e83f-7283-58a2-a1f2-18093aad665d | instance_network_interface | 03a31c43ede44dcbaacb05c870920... 
| 5770e056-a76c-5bba-9b71-aef9fdefd317 | instance_disk              | 03a31c43ede44dcbaacb05c870920... 
| 721b91bf-1140-4d2b-b42e-ace5b510e902 | volume                     | 03a31c43ede44dcbaacb05c870920... 
+--------------------------------------+----------------------------+----------------------------------

# [volume] リソース詳細

[cent@dlp ~(keystone)]$
openstack metric resource show 721b91bf-1140-4d2b-b42e-ace5b510e902

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | 0b826f1bf49d489494e94badc32f2cea                                  |
| created_by_user_id    | c35246b749884d4fae8a3bfaaa0cf7ea                                  |
| creator               | c35246b749884d4fae8a3bfaaa0cf7ea:0b826f1bf49d489494e94badc32f2cea |
| ended_at              | None                                                              |
| id                    | 721b91bf-1140-4d2b-b42e-ace5b510e902                              |
| metrics               | volume.size: 10939788-65a3-4ef3-8dfb-576cdfe1e406                 |
| original_resource_id  | 721b91bf-1140-4d2b-b42e-ace5b510e902                              |
| project_id            | 03a31c43ede44dcbaacb05c870920e81                                  |
| revision_end          | None                                                              |
| revision_start        | 2024-08-07T10:07:43.731310+00:00                                  |
| started_at            | 2024-08-07T10:07:43.731304+00:00                                  |
| type                  | volume                                                            |
| user_id               | 8a9b46168b42480f889ad4fad3ca6ee4                                  |
+-----------------------+-------------------------------------------------------------------+

# ボリューム サイズ データ

[cent@dlp ~(keystone)]$
openstack metric measures show 10939788-65a3-4ef3-8dfb-576cdfe1e406

+---------------------------+-------------+-------+
| timestamp                 | granularity | value |
+---------------------------+-------------+-------+
| 2024-08-07T19:05:00+09:00 |       300.0 |  10.0 |
+---------------------------+-------------+-------+
関連コンテンツ