CentOS 7
Sponsored Link

OpenStack Pike : Ceilometer 利用方法(Glance)2017/09/27

 
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] Image サービスの各種データ収集を有効にするには、Glance を以下のように設定します。
[root@dlp ~(keystone)]#
vi /etc/glance/glance-api.conf
# 最終行へ追記

[oslo_messaging_notifications]
driver = messagingv2
# RabbitMQ 接続情報
transport_url = rabbit://openstack:password@10.0.0.30
[root@dlp ~(keystone)]#
vi /etc/glance/glance-registry.conf
# 最終行へ追記

[oslo_messaging_notifications]
driver = messagingv2
# RabbitMQ 接続情報
transport_url = rabbit://openstack:password@10.0.0.30
[root@dlp ~(keystone)]#
systemctl restart openstack-glance-api openstack-glance-registry

[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 image create "CentOS7" --file centos7.qcow2 --disk-format qcow2 --container-format bare --public

# テストとしてイメージダウンロード

[root@dlp ~(keystone)]#
openstack image save --file centos73.qcow2 CentOS7

# リソース一覧

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

+--------------------------------------+----------------------------+----------------------------------+----
| id                                   | type                       | project_id                       | ...
+--------------------------------------+----------------------------+----------------------------------+----
| 81563c32-75b3-4426-a0a9-95390d6fddf5 | instance                   | 27f776933c3b469ba0c07deba6b57752 | ...
| e6ce9362-3045-40f4-80c5-00cbaeb0c218 | image                      | 27f776933c3b469ba0c07deba6b57752 | ...
+--------------------------------------+----------------------------+----------------------------------+----

# リソース詳細

[root@dlp ~(keystone)]#
openstack metric resource show e6ce9362-3045-40f4-80c5-00cbaeb0c218

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | 626d31665c7140ab82d88b78c4073798                                  |
| created_by_user_id    | f3ddbcb50b35481786dc468e49181678                                  |
| creator               | f3ddbcb50b35481786dc468e49181678:626d31665c7140ab82d88b78c4073798 |
| ended_at              | None                                                              |
| id                    | e6ce9362-3045-40f4-80c5-00cbaeb0c218                              |
| metrics               | image.download: b34d8e04-ad05-4689-b08e-77303e6680d9              |
|                       | image.serve: 0479bc10-8a68-4916-8415-7bead84f2ff3                 |
|                       | image.size: 76fbe18f-0b3b-4263-bc72-42779395a3fa                  |
| original_resource_id  | e6ce9362-3045-40f4-80c5-00cbaeb0c218                              |
| project_id            | 27f776933c3b469ba0c07deba6b57752                                  |
| revision_end          | None                                                              |
| revision_start        | 2017-09-29T07:46:29.271666+00:00                                  |
| started_at            | 2017-09-29T07:46:29.271630+00:00                                  |
| type                  | image                                                             |
| user_id               | None                                                              |
+-----------------------+-------------------------------------------------------------------+

# イメージ ダウンロード データ

[root@dlp ~(keystone)]#
openstack metric measures show b34d8e04-ad05-4689-b08e-77303e6680d9

+---------------------------+-------------+--------------+
| timestamp                 | granularity |        value |
+---------------------------+-------------+--------------+
| 2017-09-29T07:50:00+00:00 |       300.0 | 1377501184.0 |
+---------------------------+-------------+--------------+

# イメージ サイズ データ

[root@dlp ~(keystone)]#
openstack metric measures show 76fbe18f-0b3b-4263-bc72-42779395a3fa

+---------------------------+-------------+--------------+
| timestamp                 | granularity |        value |
+---------------------------+-------------+--------------+
| 2017-09-29T07:45:00+00:00 |       300.0 | 1377501184.0 |
+---------------------------+-------------+--------------+
関連コンテンツ