Ubuntu 22.04
Sponsored Link

OpenStack Yoga : Ceilometer 利用方法 (Glance)2022/05/07

 
OpenStack Telemetry Service (Ceilometer) の利用方法です。
当例では以下のような環境を例に Ceilometer サービスをインストールしています。
------------+-----------------------------+-----------------------------+------------
            |                             |                             |
        eth0|10.0.0.30                eth0|10.0.0.50                eth0|10.0.0.51
+-----------+-----------+     +-----------+-----------+     +-----------+-----------+
|   [ dlp.srv.world ]   |     | [ network.srv.world ] |     |  [ node01.srv.world ] |
|     (Control Node)    |     |     (Network Node)    |     |     (Compute Node)    |
|                       |     |                       |     |                       |
|  MariaDB    RabbitMQ  |     |      Open vSwitch     |     |        Libvirt        |
|  Memcached  httpd     |     |     Neutron Server    |     |      Nova Compute     |
|  Keystone   Glance    |     |      OVN-Northd       |     |      Open vSwitch     |
|  Nova API  Cinder API |     |     Cinder Volume     |     |   OVN Metadata Agent  |
|                       |     |     Gnocchi httpd     |     |     OVN-Controller    |
|                       |     |   Ceilometer Central  |     |   Ceilometer Compute  |
+-----------------------+     +-----------------------+     +-----------------------+

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

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

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

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

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| 6781b9c7-19c6-4419-a910-d0ae43c7526c | instance                   | 66102fdb888d4556a59dcff8b631f... 
| e540d3c4-7e04-5ef8-8399-5b66d78d1056 | instance_network_interface | 66102fdb888d4556a59dcff8b631f... 
| a302db56-ba64-5f36-9182-f3a9572aab1d | instance_disk              | 66102fdb888d4556a59dcff8b631f... 
+--------------------------------------+----------------------------+----------------------------------

root@dlp ~(keystone)#
openstack image list

+--------------------------------------+------------+--------+
| ID                                   | Name       | Status |
+--------------------------------------+------------+--------+
| 70f856cc-6f3a-4cc3-b576-53f829a6d714 | Ubuntu2204 | active |
+--------------------------------------+------------+--------+

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

root@dlp ~(keystone)#
openstack image save --file ubuntu2204.qcow2 Ubuntu2204

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

root@dlp ~(keystone)#
openstack image create "Ubuntu22040-2" --file ubuntu2204.qcow2 --disk-format qcow2 --container-format bare --public

# リソース一覧

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

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| 6781b9c7-19c6-4419-a910-d0ae43c7526c | instance                   | 66102fdb888d4556a59dcff8b631f... 
| e540d3c4-7e04-5ef8-8399-5b66d78d1056 | instance_network_interface | 66102fdb888d4556a59dcff8b631f... 
| a302db56-ba64-5f36-9182-f3a9572aab1d | instance_disk              | 66102fdb888d4556a59dcff8b631f... 
| d78f9dee-5f23-4fc7-9c17-9a58935ec561 | image                      | de339c4cb5984140ab0b243364e3a... 
+--------------------------------------+----------------------------+----------------------------------

# [image] リソース詳細

root@dlp ~(keystone)#
openstack metric resource show d78f9dee-5f23-4fc7-9c17-9a58935ec561

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | c1c4d9a5313f43bd9f6f555e2d34ab28                                  |
| created_by_user_id    | 66d094f65ddd49ebb6e27f48ed2c6448                                  |
| creator               | 66d094f65ddd49ebb6e27f48ed2c6448:c1c4d9a5313f43bd9f6f555e2d34ab28 |
| ended_at              | None                                                              |
| id                    | d78f9dee-5f23-4fc7-9c17-9a58935ec561                              |
| metrics               | image.size: d6332a64-5a43-443c-9c9d-dffac8bb3b44                  |
| original_resource_id  | d78f9dee-5f23-4fc7-9c17-9a58935ec561                              |
| project_id            | de339c4cb5984140ab0b243364e3a0f7                                  |
| revision_end          | None                                                              |
| revision_start        | 2022-05-05T15:43:54.349306+00:00                                  |
| started_at            | 2022-05-05T15:43:54.349300+00:00                                  |
| type                  | image                                                             |
| user_id               | None                                                              |
+-----------------------+-------------------------------------------------------------------+

# イメージ サイズ データ

root@dlp ~(keystone)#
openstack metric measures show d6332a64-5a43-443c-9c9d-dffac8bb3b44

+---------------------------+-------------+-------------+
| timestamp                 | granularity |       value |
+---------------------------+-------------+-------------+
| 2022-05-05T15:40:00+00:00 |       300.0 | 625278976.0 |
+---------------------------+-------------+-------------+
関連コンテンツ