CentOS Stream 9
Sponsored Link

OpenStack Bobcat : Ceilometer 利用方法 (Cinder)2023/10/27

 
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                       
+--------------------------------------+----------------------------+----------------------------------
| 78b8c394-be14-4312-84e8-06eeebbd74f3 | instance                   | f4598dfd3b8a47149234b6892d18d... 
| c9aff847-aa53-5449-b384-1fcd612499fd | instance_network_interface | f4598dfd3b8a47149234b6892d18d... 
| e2b0e7f8-a93f-5ec4-851f-9e98ec9cd596 | instance_disk              | f4598dfd3b8a47149234b6892d18d... 
+--------------------------------------+----------------------------+----------------------------------

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

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

# リソース一覧

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

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| 78b8c394-be14-4312-84e8-06eeebbd74f3 | instance                   | f4598dfd3b8a47149234b6892d18d... 
| c9aff847-aa53-5449-b384-1fcd612499fd | instance_network_interface | f4598dfd3b8a47149234b6892d18d... 
| e2b0e7f8-a93f-5ec4-851f-9e98ec9cd596 | instance_disk              | f4598dfd3b8a47149234b6892d18d... 
| aff2ccdf-9e34-4bf3-849d-50603b7c4806 | volume                     | f4598dfd3b8a47149234b6892d18d... 
+--------------------------------------+----------------------------+----------------------------------

# [volume] リソース詳細

[cent@dlp ~(keystone)]$
openstack metric resource show aff2ccdf-9e34-4bf3-849d-50603b7c4806

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | 5d97881520b34e6bbf1f15e778c82fe4                                  |
| created_by_user_id    | be0b90dfc5d24277ae1bfd45e4cac1f8                                  |
| creator               | be0b90dfc5d24277ae1bfd45e4cac1f8:5d97881520b34e6bbf1f15e778c82fe4 |
| ended_at              | None                                                              |
| id                    | aff2ccdf-9e34-4bf3-849d-50603b7c4806                              |
| metrics               | volume.size: 7b323eeb-dfe1-4454-8ee2-a44337b664f3                 |
| original_resource_id  | aff2ccdf-9e34-4bf3-849d-50603b7c4806                              |
| project_id            | f4598dfd3b8a47149234b6892d18d5a4                                  |
| revision_end          | None                                                              |
| revision_start        | 2023-10-27T01:07:55.530764+00:00                                  |
| started_at            | 2023-10-27T01:07:55.530759+00:00                                  |
| type                  | volume                                                            |
| user_id               | d70a5f7908de4cd9aa8e189b725244a9                                  |
+-----------------------+-------------------------------------------------------------------+

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

[cent@dlp ~(keystone)]$
openstack metric measures show 7b323eeb-dfe1-4454-8ee2-a44337b664f3

+---------------------------+-------------+-------+
| timestamp                 | granularity | value |
+---------------------------+-------------+-------+
| 2023-10-27T10:05:00+09:00 |       300.0 |  10.0 |
+---------------------------+-------------+-------+
関連コンテンツ