Debian 11 Bullseye
Sponsored Link

OpenStack Victoria : Ceilometer 利用方法 (Glance)2021/09/02

 
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                       
+--------------------------------------+----------------------------+----------------------------------
| 86981ae7-d713-414f-966c-ac22387a3226 | instance                   | cba75a02a921457db62b660f3d0b5... 
| 0697ef58-ac47-5747-bdeb-d4a60a3f068c | instance_disk              | cba75a02a921457db62b660f3d0b5... 
| 6d90e531-c30c-5aa3-bdd2-2b43032ef4cf | instance_network_interface | cba75a02a921457db62b660f3d0b5... 
+--------------------------------------+----------------------------+----------------------------------

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

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

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

root@dlp ~(keystone)#
openstack image save --file debian11.qcow2 Debian_11

# リソース一覧

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

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| 86981ae7-d713-414f-966c-ac22387a3226 | instance                   | cba75a02a921457db62b660f3d0b5... 
| 0697ef58-ac47-5747-bdeb-d4a60a3f068c | instance_disk              | cba75a02a921457db62b660f3d0b5... 
| 6d90e531-c30c-5aa3-bdd2-2b43032ef4cf | instance_network_interface | cba75a02a921457db62b660f3d0b5... 
| 6184f061-2042-4db9-9da9-8dbd6f3c06fd | image                      | 14c0b23f6f574380b9687f326debf... 
+--------------------------------------+----------------------------+----------------------------------

# [image] リソース詳細

root@dlp ~(keystone)#
openstack metric resource show 6184f061-2042-4db9-9da9-8dbd6f3c06fd

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | 1718217eee4b4f2ea143d65122864fe0                                  |
| created_by_user_id    | 64e62f8bd1714a02998bdd2c3015f940                                  |
| creator               | 64e62f8bd1714a02998bdd2c3015f940:1718217eee4b4f2ea143d65122864fe0 |
| ended_at              | None                                                              |
| id                    | 6184f061-2042-4db9-9da9-8dbd6f3c06fd                              |
| metrics               | image.download: 10c2d33b-a97b-461a-ba31-364c5e2713d1              |
|                       | image.serve: d820087f-3a8d-40e7-b143-b34346cc028e                 |
|                       | image.size: ff8c573d-7747-4aa4-92ef-a9f07dbaf15a                  |
| original_resource_id  | 6184f061-2042-4db9-9da9-8dbd6f3c06fd                              |
| project_id            | 14c0b23f6f574380b9687f326debf0fe                                  |
| revision_end          | None                                                              |
| revision_start        | 2021-09-02T05:54:56.676716+00:00                                  |
| started_at            | 2021-09-02T05:54:56.676710+00:00                                  |
| type                  | image                                                             |
| user_id               | None                                                              |
+-----------------------+-------------------------------------------------------------------+

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

root@dlp ~(keystone)#
openstack metric measures show 10c2d33b-a97b-461a-ba31-364c5e2713d1

+---------------------------+-------------+--------------+
| timestamp                 | granularity |        value |
+---------------------------+-------------+--------------+
| 2021-09-02T00:55:00-05:00 |       300.0 | 5173018624.0 |
+---------------------------+-------------+--------------+

# イメージ サイズ データ

root@dlp ~(keystone)#
openstack metric measures show ff8c573d-7747-4aa4-92ef-a9f07dbaf15a

+---------------------------+-------------+--------------+
| timestamp                 | granularity |        value |
+---------------------------+-------------+--------------+
| 2021-09-02T00:50:00-05:00 |       300.0 | 5173018624.0 |
+---------------------------+-------------+--------------+
関連コンテンツ