Ubuntu 20.04
Sponsored Link

OpenStack Ussuri : Ceilometer 利用方法 (Cinder)2020/06/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                       
+--------------------------------------+----------------------------+----------------------------------
| 2dde6728-0e9a-4bd1-b10a-196162ec5e2a | instance                   | eaa8de359ae0451d944a6401e688f... 
| f33a56c8-468d-5973-a515-a879a8ce8a64 | instance_disk              | eaa8de359ae0451d944a6401e688f... 
| 2b500dc3-e441-5ace-8600-15761d009452 | instance_network_interface | eaa8de359ae0451d944a6401e688f... 
+--------------------------------------+----------------------------+----------------------------------

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

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

# リソース一覧

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

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| 2dde6728-0e9a-4bd1-b10a-196162ec5e2a | instance                   | eaa8de359ae0451d944a6401e688f730 
| f33a56c8-468d-5973-a515-a879a8ce8a64 | instance_disk              | eaa8de359ae0451d944a6401e688f730 
| 2b500dc3-e441-5ace-8600-15761d009452 | instance_network_interface | eaa8de359ae0451d944a6401e688f730 
| b89264a5-71b4-4705-8508-c6bd0d300bc2 | volume                     | eaa8de359ae0451d944a6401e688f730 
+--------------------------------------+----------------------------+----------------------------------

# [volume] リソース詳細

ubuntu@dlp ~(keystone)$
openstack metric resource show b89264a5-71b4-4705-8508-c6bd0d300bc2

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | c0e098a54a4640caa9004fb8f500f554                                  |
| created_by_user_id    | 3d1f14e0843940dfb5afaeee1ec45507                                  |
| creator               | 3d1f14e0843940dfb5afaeee1ec45507:c0e098a54a4640caa9004fb8f500f554 |
| ended_at              | None                                                              |
| id                    | b89264a5-71b4-4705-8508-c6bd0d300bc2                              |
| metrics               | volume.size: e77fbac2-0b09-4132-8d8f-3065253106ce                 |
| original_resource_id  | b89264a5-71b4-4705-8508-c6bd0d300bc2                              |
| project_id            | eaa8de359ae0451d944a6401e688f730                                  |
| revision_end          | None                                                              |
| revision_start        | 2020-06-18T05:17:26.444443+00:00                                  |
| started_at            | 2020-06-18T05:17:26.444436+00:00                                  |
| type                  | volume                                                            |
| user_id               | 2a1e722c971c45d384efe048155d89c7                                  |
+-----------------------+-------------------------------------------------------------------+

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

ubuntu@dlp ~(keystone)$
openstack metric measures show e77fbac2-0b09-4132-8d8f-3065253106ce

+---------------------------+-------------+-------+
| timestamp                 | granularity | value |
+---------------------------+-------------+-------+
| 2020-06-18T14:15:00+09:00 |       300.0 |  10.0 |
+---------------------------+-------------+-------+
関連コンテンツ