CentOS 7
Sponsored Link

OpenStack Pike : Ceilometer 利用方法(Cinder)2017/10/01

 
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] Control ノードでの収集データの表示例です。
# リソース一覧

[root@dlp ~(keystone)]#
openstack metric resource list

+--------------------------------------+----------+----------------------------------+
| id                                   | type     | project_id                       |
+--------------------------------------+----------+----------------------------------+
| 81563c32-75b3-4426-a0a9-95390d6fddf5 | instance | 27f776933c3b469ba0c07deba6b57752 |
+--------------------------------------+----------+----------------------------------+
----------------------------------+--------------------------------------+----------------------------------+
 user_id                          | original_resource_id                 | started_at                       |
----------------------------------+--------------------------------------+----------------------------------+
 8145f0cd8aab4d00b36f2d2da4ba5337 | 81563c32-75b3-4426-a0a9-95390d6fddf5 | 2017-09-29T06:13:49.003232+00:00 |
----------------------------------+--------------------------------------+----------------------------------+
----------+----------------------------------+--------------+-----------------------------------------------+
 ended_at | revision_start                   | revision_end | creator                                       |
----------+----------------------------------+--------------+-----------------------------------------------+
 None     | 2017-09-29T06:13:49.003272+00:00 | None         | f3ddbcb50b35481786dc468e49181678:626d31665c71 |
----------+----------------------------------+--------------+-----------------------------------------------+

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

[root@dlp ~(keystone)]#
openstack volume create --size 10 disk01

# リソース一覧

[root@dlp ~(keystone)]#
openstack metric resource list

+--------------------------------------+----------------------------+----------------------------------+----
| id                                   | type                       | project_id                       | ...
+--------------------------------------+----------------------------+----------------------------------+----
| 81563c32-75b3-4426-a0a9-95390d6fddf5 | instance                   | 27f776933c3b469ba0c07deba6b57752 | ...
| 1f972805-b86f-4f03-ab9d-33a0ce9733fb | volume                     | 27f776933c3b469ba0c07deba6b57752 | ...
+--------------------------------------+----------------------------+----------------------------------+----

# リソース詳細

[root@dlp ~(keystone)]#
openstack metric resource show 1f972805-b86f-4f03-ab9d-33a0ce9733fb

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | 626d31665c7140ab82d88b78c4073798                                  |
| created_by_user_id    | 11d3d7a1c08343d9ac7cff4d9354a73f                                  |
| creator               | 11d3d7a1c08343d9ac7cff4d9354a73f:626d31665c7140ab82d88b78c4073798 |
| ended_at              | None                                                              |
| id                    | 1f972805-b86f-4f03-ab9d-33a0ce9733fb                              |
| metrics               | snapshot.size: b70b4f35-ab75-4f02-94c4-70a4cdf56bf9               |
|                       | volume.backup.size: 2d073ce6-6f34-4ecf-8b69-54283ee6af90          |
|                       | volume.size: c50d21ce-d33a-447b-aad9-5da4e06df91f                 |
|                       | volume.snapshot.size: 91fe988a-f5c8-42b0-8431-ab791f8a8296        |
|                       | volume: 157b26fc-c670-4e5d-8d9c-f94a21ef1b83                      |
| original_resource_id  | 1f972805-b86f-4f03-ab9d-33a0ce9733fb                              |
| project_id            | 27f776933c3b469ba0c07deba6b57752                                  |
| revision_end          | None                                                              |
| revision_start        | 2017-10-02T04:35:12.872375+00:00                                  |
| started_at            | 2017-10-02T04:35:12.872348+00:00                                  |
| type                  | volume                                                            |
| user_id               | 8145f0cd8aab4d00b36f2d2da4ba5337                                  |
+-----------------------+-------------------------------------------------------------------+

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

[root@dlp ~(keystone)]#
openstack metric measures show c50d21ce-d33a-447b-aad9-5da4e06df91f

+---------------------------+-------------+-------+
| timestamp                 | granularity | value |
+---------------------------+-------------+-------+
| 2017-10-02T04:35:00+00:00 |       300.0 |  10.0 |
+---------------------------+-------------+-------+
関連コンテンツ