CentOS 7
Sponsored Link

OpenStack Queens : Ceilometer 利用方法(Glance)2018/03/11

 
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] イメージを追加等した場合に収集されるデータの表示例です。
# リソース一覧

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

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| 70846728-419e-47bf-8b25-829d12edfca6 | instance                   | 52e02649325e4cf1b903d00cadb8f... 
| 6edf4961-70e0-52f0-8723-6ed18d96776a | instance_disk              | 52e02649325e4cf1b903d00cadb8f... 
| 6b2e6172-3c58-59d6-ac72-0c79ae0ce313 | instance_network_interface | 52e02649325e4cf1b903d00cadb8f... 
+--------------------------------------+----------------------------+----------------------------------

# テストとしてイメージ登録

[root@dlp ~(keystone)]#
openstack image create "CentOS74" --file centos74.qcow2 --disk-format qcow2 --container-format bare --public

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

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

# リソース一覧

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

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| 70846728-419e-47bf-8b25-829d12edfca6 | instance                   | 52e02649325e4cf1b903d00cadb8f... 
| 6edf4961-70e0-52f0-8723-6ed18d96776a | instance_disk              | 52e02649325e4cf1b903d00cadb8f... 
| 6b2e6172-3c58-59d6-ac72-0c79ae0ce313 | instance_network_interface | 52e02649325e4cf1b903d00cadb8f... 
| fcb4860b-c333-4169-9478-c05e86a9c594 | image                      | 2551ca222ff54fac984a914e5beb4... 
+--------------------------------------+----------------------------+----------------------------------

# リソース詳細

[root@dlp ~(keystone)]#
openstack metric resource show fcb4860b-c333-4169-9478-c05e86a9c594

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | b1da1070c8af427886d0202f8bbe414f                                  |
| created_by_user_id    | 61d8449da0b345f2aecfaf0d13310bd7                                  |
| creator               | 61d8449da0b345f2aecfaf0d13310bd7:b1da1070c8af427886d0202f8bbe414f |
| ended_at              | None                                                              |
| id                    | fcb4860b-c333-4169-9478-c05e86a9c594                              |
| metrics               | image.download: 908e9867-efeb-48b7-8eb0-8714f50e135b              |
|                       | image.serve: f5860912-73f7-4abb-844c-e315b812250a                 |
|                       | image.size: 1391eb15-909a-4532-948f-50d82b1044c6                  |
| original_resource_id  | fcb4860b-c333-4169-9478-c05e86a9c594                              |
| project_id            | 2551ca222ff54fac984a914e5beb40d1                                  |
| revision_end          | None                                                              |
| revision_start        | 2018-03-12T07:49:42.083251+00:00                                  |
| started_at            | 2018-03-12T07:49:42.083209+00:00                                  |
| type                  | image                                                             |
| user_id               | None                                                              |
+-----------------------+-------------------------------------------------------------------+

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

[root@dlp ~(keystone)]#
openstack metric measures show 908e9867-efeb-48b7-8eb0-8714f50e135b

+---------------------------+-------------+--------------+
| timestamp                 | granularity |        value |
+---------------------------+-------------+--------------+
| 2018-03-12T16:50:00+09:00 |       300.0 | 1324154880.0 |
+---------------------------+-------------+--------------+

# イメージ サイズ データ

[root@dlp ~(keystone)]#
openstack metric measures show 1391eb15-909a-4532-948f-50d82b1044c6

+---------------------------+-------------+--------------+
| timestamp                 | granularity |        value |
+---------------------------+-------------+--------------+
| 2018-03-12T16:45:00+09:00 |       300.0 | 1324154880.0 |
+---------------------------+-------------+--------------+
関連コンテンツ