Ubuntu 18.04
Sponsored Link

OpenStack Stein : Ceilometer 利用方法(Cinder)2019/04/18

 
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                       
+--------------------------------------+----------------------------+----------------------------------
| c714d070-f035-42b8-9660-999088da37b1 | instance                   | ff03eefa265b423aa3375acb46a8e...
| 933faac4-688a-55a5-8f62-927898cc9297 | instance_network_interface | ff03eefa265b423aa3375acb46a8e...
| 26de0c76-9999-5e9b-b3e3-758a1af1b5e3 | instance_disk              | ff03eefa265b423aa3375acb46a8e...
| f92025e7-33b7-4a63-bc25-8b7d206773d9 | instance                   | ff03eefa265b423aa3375acb46a8e...
+--------------------------------------+----------------------------+----------------------------------

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

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

# リソース一覧

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

+--------------------------------------+----------------------------+---------------------------------
| id                                   | type                       | project_id                      
+--------------------------------------+----------------------------+---------------------------------
| c714d070-f035-42b8-9660-999088da37b1 | instance                   | ff03eefa265b423aa3375acb46a8e...
| 933faac4-688a-55a5-8f62-927898cc9297 | instance_network_interface | ff03eefa265b423aa3375acb46a8e...
| 26de0c76-9999-5e9b-b3e3-758a1af1b5e3 | instance_disk              | ff03eefa265b423aa3375acb46a8e...
| f92025e7-33b7-4a63-bc25-8b7d206773d9 | instance                   | ff03eefa265b423aa3375acb46a8e...
| 97f57314-259e-4b99-b202-575a8e7a0ed8 | volume                     | ff03eefa265b423aa3375acb46a8e...
+--------------------------------------+----------------------------+---------------------------------

# volume リソース詳細

ubuntu@dlp ~(keystone)$
openstack metric resource show 97f57314-259e-4b99-b202-575a8e7a0ed8

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | efc5c6a05d444cae80c0a80f49ba87d4                                  |
| created_by_user_id    | ad726bcc13b9436d8fecb2336e9a5dae                                  |
| creator               | ad726bcc13b9436d8fecb2336e9a5dae:efc5c6a05d444cae80c0a80f49ba87d4 |
| ended_at              | None                                                              |
| id                    | 97f57314-259e-4b99-b202-575a8e7a0ed8                              |
| metrics               | volume.size: 84be5c3b-1ccd-4b8c-9a1c-a710566f111e                 |
| original_resource_id  | 97f57314-259e-4b99-b202-575a8e7a0ed8                              |
| project_id            | ff03eefa265b423aa3375acb46a8e4e0                                  |
| revision_end          | None                                                              |
| revision_start        | 2019-04-18T03:58:37.584059+00:00                                  |
| started_at            | 2019-04-18T03:58:37.584005+00:00                                  |
| type                  | volume                                                            |
| user_id               | 5ed13a6b898b412383faf11ab2099a66                                  |
+-----------------------+-------------------------------------------------------------------+

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

ubuntu@dlp ~(keystone)$
openstack metric measures show 84be5c3b-1ccd-4b8c-9a1c-a710566f111e

+---------------------------+-------------+-------+
| timestamp                 | granularity | value |
+---------------------------+-------------+-------+
| 2019-04-18T12:55:00+09:00 |       300.0 |  10.0 |
+---------------------------+-------------+-------+
関連コンテンツ