CentOS Stream 9
Sponsored Link

OpenStack Yoga : Ceilometer 利用方法 (Cinder)2022/06/13

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

[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                       
+--------------------------------------+----------------------------+----------------------------------
| 25ef320e-b16e-4085-96ef-af7fa0d33cfb | instance                   | 911e5ff7686741c782d6acc6d7155... 
| f7e5361a-fd6c-568a-a718-0168c5ae2c65 | instance_network_interface | 911e5ff7686741c782d6acc6d7155... 
| 4f70f768-ed81-58c8-be82-704e89dfc79d | instance_disk              | 911e5ff7686741c782d6acc6d7155... 
+--------------------------------------+----------------------------+----------------------------------

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

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

# リソース一覧

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

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| 25ef320e-b16e-4085-96ef-af7fa0d33cfb | instance                   | 911e5ff7686741c782d6acc6d7155... 
| f7e5361a-fd6c-568a-a718-0168c5ae2c65 | instance_network_interface | 911e5ff7686741c782d6acc6d7155... 
| 4f70f768-ed81-58c8-be82-704e89dfc79d | instance_disk              | 911e5ff7686741c782d6acc6d7155... 
| bddbc46f-d71b-4a47-95b9-b3f655bbe3a2 | volume                     | 911e5ff7686741c782d6acc6d7155... 
+--------------------------------------+----------------------------+----------------------------------

# [volume] リソース詳細

[cent@dlp ~(keystone)]$
openstack metric resource show bddbc46f-d71b-4a47-95b9-b3f655bbe3a2

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | 0f2625947bf0433a9519ba8a29434bdf                                  |
| created_by_user_id    | efeba9b14c234edbb78d0cbad397e6ed                                  |
| creator               | efeba9b14c234edbb78d0cbad397e6ed:0f2625947bf0433a9519ba8a29434bdf |
| ended_at              | None                                                              |
| id                    | bddbc46f-d71b-4a47-95b9-b3f655bbe3a2                              |
| metrics               | volume.size: f00f547e-cbe3-4e2d-af34-f1d171a62f51                 |
| original_resource_id  | bddbc46f-d71b-4a47-95b9-b3f655bbe3a2                              |
| project_id            | 911e5ff7686741c782d6acc6d7155db1                                  |
| revision_end          | None                                                              |
| revision_start        | 2022-06-13T06:23:13.199611+00:00                                  |
| started_at            | 2022-06-13T06:23:13.199604+00:00                                  |
| type                  | volume                                                            |
| user_id               | 1ff4591a7f8140fcad38fd9f606a66a6                                  |
+-----------------------+-------------------------------------------------------------------+

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

[cent@dlp ~(keystone)]$
openstack metric measures show f00f547e-cbe3-4e2d-af34-f1d171a62f51

+---------------------------+-------------+-------+
| timestamp                 | granularity | value |
+---------------------------+-------------+-------+
| 2022-06-13T15:20:00+09:00 |       300.0 |  10.0 |
+---------------------------+-------------+-------+
関連コンテンツ