CentOS Stream 8
Sponsored Link

OpenStack Xena : Ceilometer 利用方法 (Cinder)2021/11/25

 
OpenStack Telemetry Service (Ceilometer) の利用方法です。
当例では以下のような環境を例に Ceilometer サービスをインストールしています。
------------+---------------------------+---------------------------+------------
            |                           |                           |
        eth0|10.0.0.30              eth0|10.0.0.50              eth0|10.0.0.51
+-----------+-----------+   +-----------+-----------+   +-----------+-----------+
|    [ 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 Volume     |   |   OVN Metadata Agent  |
|  Cinder API           |   |      iSCSI Target     |   |     OVN-Controller    |
|                       |   |     Heat API/Engine   |   |   Ceilometer Compute  |
|                       |   |     Gnocchi httpd     |   |                       |
|                       |   |   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@10.0.0.30
[root@dlp ~(keystone)]#
systemctl restart openstack-cinder-api openstack-cinder-scheduler

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

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

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| a6180855-77cf-476f-9f26-4fc79baa38c2 | instance                   | 2decda8bcd724687a1cf05064ab21... 
| 5624383f-677b-598e-a43b-4eb1a1cb5afd | instance_disk              | 2decda8bcd724687a1cf05064ab21... 
| d83f7af1-8e5c-52a0-b151-0a0ee0978e9a | instance_network_interface | 2decda8bcd724687a1cf05064ab21... 
+--------------------------------------+----------------------------+----------------------------------

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

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

# リソース一覧

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

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| a6180855-77cf-476f-9f26-4fc79baa38c2 | instance                   | 2decda8bcd724687a1cf05064ab21... 
| 5624383f-677b-598e-a43b-4eb1a1cb5afd | instance_disk              | 2decda8bcd724687a1cf05064ab21... 
| d83f7af1-8e5c-52a0-b151-0a0ee0978e9a | instance_network_interface | 2decda8bcd724687a1cf05064ab21... 
| afaf4dac-cff5-4d7c-a5fd-178438b12028 | volume                     | 2decda8bcd724687a1cf05064ab21... 
+--------------------------------------+----------------------------+----------------------------------

# [volume] リソース詳細

[cent@dlp ~(keystone)]$
openstack metric resource show afaf4dac-cff5-4d7c-a5fd-178438b12028

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | 7e53ef14eb894f379ea1929f5defc949                                  |
| created_by_user_id    | 1bbca96b926645e18c83df974aafc98f                                  |
| creator               | 1bbca96b926645e18c83df974aafc98f:7e53ef14eb894f379ea1929f5defc949 |
| ended_at              | None                                                              |
| id                    | afaf4dac-cff5-4d7c-a5fd-178438b12028                              |
| metrics               | volume.size: bd3237cf-5090-47d2-b655-ebcaf424ee73                 |
| original_resource_id  | afaf4dac-cff5-4d7c-a5fd-178438b12028                              |
| project_id            | 2decda8bcd724687a1cf05064ab21fdf                                  |
| revision_end          | None                                                              |
| revision_start        | 2021-11-25T06:27:23.536050+00:00                                  |
| started_at            | 2021-11-25T06:27:23.536043+00:00                                  |
| type                  | volume                                                            |
| user_id               | 6a517543654044e8b4ea9e0eea0adaa4                                  |
+-----------------------+-------------------------------------------------------------------+

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

[cent@dlp ~(keystone)]$
openstack metric measures show bd3237cf-5090-47d2-b655-ebcaf424ee73

+---------------------------+-------------+-------+
| timestamp                 | granularity | value |
+---------------------------+-------------+-------+
| 2021-11-25T15:25:00+09:00 |       300.0 |  10.0 |
+---------------------------+-------------+-------+
関連コンテンツ