CentOS 7
Sponsored Link

OpenStack Stein : Ceilometer 利用方法(Cinder)2019/05/17

 
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                       | user_id     
+--------------------------------------+----------------------------+----------------------------------+-------------
| aced428a-2d16-4679-9798-50e69c7aaf1d | instance                   | caab6ec580994e6481cd104b9d210f3f | b5dd128c2...
| 549a0c66-9dd0-5356-90c8-c742f46d46ca | instance_network_interface | caab6ec580994e6481cd104b9d210f3f | b5dd128c2...
| 291bfeb0-05f2-5918-8a0d-be2e6fdc0f6f | instance_disk              | caab6ec580994e6481cd104b9d210f3f | b5dd128c2...
| a2e7b8cf-003d-4431-a4cc-c898169645d6 | instance                   | caab6ec580994e6481cd104b9d210f3f | b5dd128c2...
+--------------------------------------+----------------------------+----------------------------------+-------------

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

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

# リソース一覧

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

+--------------------------------------+----------------------------+----------------------------------+--------------
| id                                   | type                       | project_id                       | user_id      
+--------------------------------------+----------------------------+----------------------------------+--------------
| aced428a-2d16-4679-9798-50e69c7aaf1d | instance                   | caab6ec580994e6481cd104b9d210f3f | b5dd128c2f...
| 549a0c66-9dd0-5356-90c8-c742f46d46ca | instance_network_interface | caab6ec580994e6481cd104b9d210f3f | b5dd128c2f...
| 291bfeb0-05f2-5918-8a0d-be2e6fdc0f6f | instance_disk              | caab6ec580994e6481cd104b9d210f3f | b5dd128c2f...
| a2e7b8cf-003d-4431-a4cc-c898169645d6 | instance                   | caab6ec580994e6481cd104b9d210f3f | b5dd128c2f...
| a5def4e5-7028-40a8-bff8-8320f3af8121 | volume                     | caab6ec580994e6481cd104b9d210f3f | b5dd128c2f...
+--------------------------------------+----------------------------+----------------------------------+--------------

# リソース詳細

[cent@dlp ~(keystone)]$
openstack metric resource show a5def4e5-7028-40a8-bff8-8320f3af8121

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | c5e87c9b460e4f16801b4102019c97e6                                  |
| created_by_user_id    | afc534e952064ca2b16fc3e242c15665                                  |
| creator               | afc534e952064ca2b16fc3e242c15665:c5e87c9b460e4f16801b4102019c97e6 |
| ended_at              | None                                                              |
| id                    | a5def4e5-7028-40a8-bff8-8320f3af8121                              |
| metrics               | volume.size: c07d4b83-532b-4f9d-9604-6c24de484ef7                 |
| original_resource_id  | a5def4e5-7028-40a8-bff8-8320f3af8121                              |
| project_id            | caab6ec580994e6481cd104b9d210f3f                                  |
| revision_end          | None                                                              |
| revision_start        | 2019-05-17T06:57:53.329560+00:00                                  |
| started_at            | 2019-05-17T06:57:53.329481+00:00                                  |
| type                  | volume                                                            |
| user_id               | b5dd128c2fd744c892ad7d1fb39d21a0                                  |
+-----------------------+-------------------------------------------------------------------+

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

[cent@dlp ~(keystone)]$
openstack metric measures show c07d4b83-532b-4f9d-9604-6c24de484ef7

+---------------------------+-------------+-------+
| timestamp                 | granularity | value |
+---------------------------+-------------+-------+
| 2019-05-17T15:55:00+09:00 |       300.0 |  10.0 |
+---------------------------+-------------+-------+
関連コンテンツ