Ubuntu 20.04
Sponsored Link

OpenStack Ussuri : Ceilometer 利用方法 (Glance)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] 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)#
systemctl restart glance-api

[2] イメージを追加等した場合に収集されるデータの表示例です。
# リソース一覧

root@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... 
+--------------------------------------+----------------------------+----------------------------------

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

root@dlp ~(keystone)#
openstack image create "Ubuntu200402" --file /var/kvm/images/ubuntu2004.img --disk-format qcow2 --container-format bare --public

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

root@dlp ~(keystone)#
openstack image save --file ubuntu2004.qcow2 Ubuntu200402

# リソース一覧

root@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... 
| 6d64d1aa-d2a9-413a-92a0-daed704e0066 | image                      | 3227cdd34d5c4d9c97eeb8f0dfdf5... 
+--------------------------------------+----------------------------+----------------------------------

# [image] リソース詳細

root@dlp ~(keystone)#
openstack metric resource show 6d64d1aa-d2a9-413a-92a0-daed704e0066

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | c0e098a54a4640caa9004fb8f500f554                                  |
| created_by_user_id    | 3d1f14e0843940dfb5afaeee1ec45507                                  |
| creator               | 3d1f14e0843940dfb5afaeee1ec45507:c0e098a54a4640caa9004fb8f500f554 |
| ended_at              | None                                                              |
| id                    | 6d64d1aa-d2a9-413a-92a0-daed704e0066                              |
| metrics               | image.download: 48e870df-6f85-4968-b8f3-eddfbe81366f              |
|                       | image.serve: 8213e296-d72a-4499-9455-6b853d6dabd1                 |
|                       | image.size: 8c739937-ba60-499e-8ca9-326632e03588                  |
| original_resource_id  | 6d64d1aa-d2a9-413a-92a0-daed704e0066                              |
| project_id            | 3227cdd34d5c4d9c97eeb8f0dfdf5d0e                                  |
| revision_end          | None                                                              |
| revision_start        | 2020-06-18T05:11:45.706693+00:00                                  |
| started_at            | 2020-06-18T05:11:45.706685+00:00                                  |
| type                  | image                                                             |
| user_id               | None                                                              |
+-----------------------+-------------------------------------------------------------------+

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

root@dlp ~(keystone)#
openstack metric measures show 48e870df-6f85-4968-b8f3-eddfbe81366f

+---------------------------+-------------+--------------+
| timestamp                 | granularity |        value |
+---------------------------+-------------+--------------+
| 2020-06-18T14:10:00+09:00 |       300.0 | 3137404928.0 |
+---------------------------+-------------+--------------+

# イメージ サイズ データ

root@dlp ~(keystone)#
openstack metric measures show 8c739937-ba60-499e-8ca9-326632e03588

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