CentOS Stream 8
Sponsored Link

OpenStack Yoga : Ceilometer 利用方法 (Glance)2022/06/02

 
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 openstack-glance-api

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

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

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| dd438403-6097-45bd-aca6-945d29e100ce | instance                   | c57c47e1df204aa6b437cdcbae628... 
| bbd4fd1d-5a1f-5a70-aac7-81b72a8ece38 | instance_network_interface | 3d85d1e79d654b3dade01eb5bfbf0... 
| f0f7ad4d-fcc3-56e2-81fa-fb086d93d6d3 | instance_disk              | 3d85d1e79d654b3dade01eb5bfbf0... 
+--------------------------------------+----------------------------+----------------------------------

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

+--------------------------------------+-----------------+--------+
| ID                                   | Name            | Status |
+--------------------------------------+-----------------+--------+
| 7be5b7ab-36e8-43c7-95dd-34b4139a0e44 | CentOS-Stream-8 | active |
+--------------------------------------+-----------------+--------+

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

[root@dlp ~(keystone)]#
openstack image save --file centos-st8.qcow2 CentOS-Stream-8

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

[root@dlp ~(keystone)]#
openstack image create "CentOS-ST8" --file centos-st8.qcow2 --disk-format qcow2 --container-format bare --public

# リソース一覧

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

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| dd438403-6097-45bd-aca6-945d29e100ce | instance                   | c57c47e1df204aa6b437cdcbae628... 
| bbd4fd1d-5a1f-5a70-aac7-81b72a8ece38 | instance_network_interface | 3d85d1e79d654b3dade01eb5bfbf0... 
| f0f7ad4d-fcc3-56e2-81fa-fb086d93d6d3 | instance_disk              | 3d85d1e79d654b3dade01eb5bfbf0... 
| 7efe4a16-0fdb-4828-a6b1-2476e4bb2c90 | image                      | 0609d3b3b398456187fb705ec9224... 
+--------------------------------------+----------------------------+----------------------------------

# [image] リソース詳細

[root@dlp ~(keystone)]#
openstack metric resource show 7efe4a16-0fdb-4828-a6b1-2476e4bb2c90

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | 8787527217494c6a87dd5a3b68dce1ef                                  |
| created_by_user_id    | 0101cdc1b5f64f998ec4d7541fed4771                                  |
| creator               | 0101cdc1b5f64f998ec4d7541fed4771:8787527217494c6a87dd5a3b68dce1ef |
| ended_at              | None                                                              |
| id                    | 7efe4a16-0fdb-4828-a6b1-2476e4bb2c90                              |
| metrics               | image.size: 904c6ffc-b228-47df-99f0-2e0bd1519381                  |
| original_resource_id  | 7efe4a16-0fdb-4828-a6b1-2476e4bb2c90                              |
| project_id            | 0609d3b3b398456187fb705ec9224c4a                                  |
| revision_end          | None                                                              |
| revision_start        | 2022-06-02T02:40:50.462480+00:00                                  |
| started_at            | 2022-06-02T02:40:50.462471+00:00                                  |
| type                  | image                                                             |
| user_id               | None                                                              |
+-----------------------+-------------------------------------------------------------------+

# イメージ サイズ データ

[root@dlp ~(keystone)]#
openstack metric measures show 904c6ffc-b228-47df-99f0-2e0bd1519381

+---------------------------+-------------+--------------+
| timestamp                 | granularity |        value |
+---------------------------+-------------+--------------+
| 2022-06-02T11:40:00+09:00 |       300.0 | 2610888704.0 |
+---------------------------+-------------+--------------+
関連コンテンツ