Ubuntu 18.04
Sponsored Link

OpenStack Queens : Ceilometer 利用方法(Cinder)2018/06/20

 
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  |   |      Linux Bridge     |   |        Libvirt        |
|  Memcached  httpd     |   |        L2_Agent       |   |     Nova_Compute      |
|  Keystone   Glance    |   |        L3_Agent       |   |      Linux Bridge     |
|  Nova_API  Cinder_API |   |     Metadata_Agent    |   |        L2_Agent       |
|  Neutron_Server       |   |     Cinder_Volume     |   |   Ceilometer_Compute  |
|  Metadata_Agent       |   |        Heat_API       |   |                       |
|                       |   |      Heat Engine      |   |                       |
|                       |   |    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 apache2 cinder-scheduler

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

ubuntu@dlp ~(keystone)$
openstack metric resource list

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| bbc2a8a6-7c81-4d4e-94c5-0632ff3aa86f | instance                   | 04a16d601dc940dd845f3092ce271... 
| 3aae02ab-b9b7-4edf-81e2-fea2df72fc8e | instance                   | 04a16d601dc940dd845f3092ce271... 
| 511490b6-a731-52fb-8a08-0b26b11b4cd5 | instance_disk              | 04a16d601dc940dd845f3092ce271... 
| bbb376d5-5e6b-581d-996d-73a018efa641 | instance_network_interface | 04a16d601dc940dd845f3092ce271... 
| 4a07c8dd-606a-4063-99d8-d566e278da09 | instance                   | 04a16d601dc940dd845f3092ce271... 
+--------------------------------------+----------------------------+----------------------------------

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

ubuntu@dlp ~(keystone)$
openstack volume create --size 10 disk01

# リソース一覧

ubuntu@dlp ~(keystone)$
openstack metric resource list

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| bbc2a8a6-7c81-4d4e-94c5-0632ff3aa86f | instance                   | 04a16d601dc940dd845f3092ce271... 
| 3aae02ab-b9b7-4edf-81e2-fea2df72fc8e | instance                   | 04a16d601dc940dd845f3092ce271... 
| 511490b6-a731-52fb-8a08-0b26b11b4cd5 | instance_disk              | 04a16d601dc940dd845f3092ce271... 
| bbb376d5-5e6b-581d-996d-73a018efa641 | instance_network_interface | 04a16d601dc940dd845f3092ce271... 
| 4a07c8dd-606a-4063-99d8-d566e278da09 | instance                   | 04a16d601dc940dd845f3092ce271... 
| 22b662cf-a585-4faa-926f-42d278abd271 | volume                     | 04a16d601dc940dd845f3092ce271... 
+--------------------------------------+----------------------------+----------------------------------

# リソース詳細

ubuntu@dlp ~(keystone)$
openstack metric resource show 22b662cf-a585-4faa-926f-42d278abd271

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | fa8bf7aca73e44cb9bc2c9f42859857e                                  |
| created_by_user_id    | 78ed5a8c14194fcba73206f1c0b0174f                                  |
| creator               | 78ed5a8c14194fcba73206f1c0b0174f:fa8bf7aca73e44cb9bc2c9f42859857e |
| ended_at              | None                                                              |
| id                    | 22b662cf-a585-4faa-926f-42d278abd271                              |
| metrics               | snapshot.size: 6c9d3cfa-3fb1-46e6-b9f8-02cc20bcc2e5               |
|                       | volume.backup.size: bb8f5f24-b167-4f0d-b19d-e4ed2a9e6c4f          |
|                       | volume.size: f8eb1c2f-eb85-4398-b3af-de3c56d27bee                 |
|                       | volume.snapshot.size: dc85aff9-3c99-4401-ae38-87ffc8d52aac        |
|                       | volume: 7c032072-ef59-4278-8f18-e620bec105f2                      |
| original_resource_id  | 22b662cf-a585-4faa-926f-42d278abd271                              |
| project_id            | 04a16d601dc940dd845f3092ce2712e8                                  |
| revision_end          | None                                                              |
| revision_start        | 2018-06-20T07:07:47.690101+00:00                                  |
| started_at            | 2018-06-20T07:07:47.690074+00:00                                  |
| type                  | volume                                                            |
| user_id               | 601473fae2c444a484860046ef2484e2                                  |
+-----------------------+-------------------------------------------------------------------+

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

ubuntu@dlp ~(keystone)$
openstack metric measures show f8eb1c2f-eb85-4398-b3af-de3c56d27bee

+---------------------------+-------------+-------+
| timestamp                 | granularity | value |
+---------------------------+-------------+-------+
| 2018-06-20T16:05:00+09:00 |       300.0 |  10.0 |
+---------------------------+-------------+-------+
関連コンテンツ