Ubuntu 22.04
Sponsored Link

OpenStack Zed : Ceilometer 利用方法 (Glance)2022/10/11

 
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  Nginx     |     |     Neutron Server    |     |      Nova Compute     |
|  Keystone   httpd     |     |      OVN-Northd       |     |      Open vSwitch     |
|  Glance     Nova API  |     |  Nginx  iSCSI Target  |     |   OVN Metadata Agent  |
|  Cinder API           |     |     Cinder Volume     |     |     OVN-Controller    |
|                       |     |     Gnocchi httpd     |     |   Ceilometer Compute  |
|                       |     |   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@dlp.srv.world
root@dlp ~(keystone)#
systemctl restart glance-api

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

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

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| a456ee32-b105-4c5e-8eae-ddccb48f913e | instance                   | 4dd1e1f6bac441ff9c77002c3ab4c58a 
| dff4e871-53dc-5531-a1f2-3da5e7f69191 | instance_network_interface | 4dd1e1f6bac441ff9c77002c3ab4c58a 
| d90cfa81-9edd-51cb-8521-ac01203c3797 | instance_disk              | 4dd1e1f6bac441ff9c77002c3ab4c58a 
+--------------------------------------+----------------------------+----------------------------------

root@dlp ~(keystone)#
openstack image list

+--------------------------------------+------------+--------+
| ID                                   | Name       | Status |
+--------------------------------------+------------+--------+
| 126bc335-fc00-478d-b84a-a9e79eba2574 | 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                       
+--------------------------------------+----------------------------+----------------------------------
| a456ee32-b105-4c5e-8eae-ddccb48f913e | instance                   | 4dd1e1f6bac441ff9c77002c3ab4c58a 
| dff4e871-53dc-5531-a1f2-3da5e7f69191 | instance_network_interface | 4dd1e1f6bac441ff9c77002c3ab4c58a 
| d90cfa81-9edd-51cb-8521-ac01203c3797 | instance_disk              | 4dd1e1f6bac441ff9c77002c3ab4c58a 
| ce8f7bc5-5731-428e-baae-48a15d29a8ef | image                      | 231a529f51394426b07c56f2c5ec580e 
+--------------------------------------+----------------------------+----------------------------------

# [image] リソース詳細

root@dlp ~(keystone)#
openstack metric resource show ce8f7bc5-5731-428e-baae-48a15d29a8ef

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | ee51c09c765e4a4d958c2bcc4dbb5665                                  |
| created_by_user_id    | 1070f194127a4a52aca630dab3365662                                  |
| creator               | 1070f194127a4a52aca630dab3365662:ee51c09c765e4a4d958c2bcc4dbb5665 |
| ended_at              | None                                                              |
| id                    | ce8f7bc5-5731-428e-baae-48a15d29a8ef                              |
| metrics               | image.size: da2fa9e3-536c-4633-9717-7f3f8e77c7ec                  |
| original_resource_id  | ce8f7bc5-5731-428e-baae-48a15d29a8ef                              |
| project_id            | 231a529f51394426b07c56f2c5ec580e                                  |
| revision_end          | None                                                              |
| revision_start        | 2022-10-11T00:43:24.055007+00:00                                  |
| started_at            | 2022-10-11T00:43:24.055001+00:00                                  |
| type                  | image                                                             |
| user_id               | None                                                              |
+-----------------------+-------------------------------------------------------------------+

# イメージ サイズ データ

root@dlp ~(keystone)#
openstack metric measures show da2fa9e3-536c-4633-9717-7f3f8e77c7ec

+---------------------------+-------------+-------------+
| timestamp                 | granularity |       value |
+---------------------------+-------------+-------------+
| 2022-10-11T00:40:00+00:00 |       300.0 | 661716992.0 |
+---------------------------+-------------+-------------+
関連コンテンツ