CentOS 8
Sponsored Link

OpenStack Ussuri : Ceilometer 利用方法 (Cinder)2020/06/10

 
OpenStack Telemetry Service (Ceilometer) の利用方法です。
当例では以下のような環境を例に Ceilometer サービスをインストールしています。
------------+---------------------------+---------------------------+------------
            |                           |                           |
        eth0|10.0.0.30              eth0|10.0.0.50              eth0|10.0.0.51
+-----------+-----------+   +-----------+-----------+   +-----------+-----------+
|    [ Control Node ]   |   |    [ Storage Node ]   |   |    [ Compute Node ]   |
|                       |   |                       |   |                       |
|  MariaDB    RabbitMQ  |   |      Open vSwitch     |   |        Libvirt        |
|  Memcached  httpd     |   |        L2 Agent       |   |     Nova Compute      |
|  Keystone   Glance    |   |        L3 Agent       |   |      Open vSwitch     |
|  Nova API  Cinder API |   |     Metadata Agent    |   |        L2 Agent       |
|  Neutron Server       |   |     Cinder Volume     |   |  Ceilometer Compute   |
|  Metadata Agent       |   |        Heat API       |   |                       |
|  Gnocchi              |   |      Heat Engine      |   |                       |
|  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                       
+--------------------------------------+----------------------------+----------------------------------
| cffa1ff3-6d1f-46d8-b98b-d488724972c3 | instance                   | d9c8c215499949cfb249b28bdaba848a 
| 38e60146-7914-51f2-97f3-fb2cb5885289 | instance_network_interface | d9c8c215499949cfb249b28bdaba848a 
| 2e00f938-8e21-54ff-967f-b69d9d74b4ba | instance_disk              | d9c8c215499949cfb249b28bdaba848a 
+--------------------------------------+----------------------------+----------------------------------

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

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

# リソース一覧

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

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| 2929c442-26c4-41cb-b95f-98c3adceb3ef | instance                   | d9c8c215499949cfb249b28bdaba8... 
| 3d231f82-2e4e-5854-817a-b793b51e1743 | instance_disk              | d9c8c215499949cfb249b28bdaba8... 
| 3201a0d6-16fb-5a1a-8646-a76e23b5ad1c | instance_network_interface | d9c8c215499949cfb249b28bdaba8... 
| cffa1ff3-6d1f-46d8-b98b-d488724972c3 | instance                   | d9c8c215499949cfb249b28bdaba8... 
| 38e60146-7914-51f2-97f3-fb2cb5885289 | instance_network_interface | d9c8c215499949cfb249b28bdaba8... 
| 2e00f938-8e21-54ff-967f-b69d9d74b4ba | instance_disk              | d9c8c215499949cfb249b28bdaba8... 
| 4c0c6f4b-0c31-47c0-abb2-8413fdc6c4a6 | volume                     | d9c8c215499949cfb249b28bdaba8... 
+--------------------------------------+----------------------------+----------------------------------

# [volume] リソース詳細

[cent@dlp ~(keystone)]$
openstack metric resource show 4c0c6f4b-0c31-47c0-abb2-8413fdc6c4a6

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | 03fc3b5cc0434f748ec562dd74866396                                  |
| created_by_user_id    | 97a80018ee3e41ceafc0c8caa42c9b82                                  |
| creator               | 97a80018ee3e41ceafc0c8caa42c9b82:03fc3b5cc0434f748ec562dd74866396 |
| ended_at              | None                                                              |
| id                    | 4c0c6f4b-0c31-47c0-abb2-8413fdc6c4a6                              |
| metrics               | volume.size: 26056113-106d-4d8e-bade-b8f7faa69cc3                 |
| original_resource_id  | 4c0c6f4b-0c31-47c0-abb2-8413fdc6c4a6                              |
| project_id            | d9c8c215499949cfb249b28bdaba848a                                  |
| revision_end          | None                                                              |
| revision_start        | 2020-06-10T07:41:46.027294+00:00                                  |
| started_at            | 2020-06-10T07:41:46.027282+00:00                                  |
| type                  | volume                                                            |
| user_id               | 0e4117de456a4bbaa5aac2cc6507be91                                  |
+-----------------------+-------------------------------------------------------------------+

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

[cent@dlp ~(keystone)]$
openstack metric measures show 26056113-106d-4d8e-bade-b8f7faa69cc3

+---------------------------+-------------+-------+
| timestamp                 | granularity | value |
+---------------------------+-------------+-------+
| 2020-06-10T16:40:00+09:00 |       300.0 |  10.0 |
+---------------------------+-------------+-------+
関連コンテンツ