Ubuntu 22.04
Sponsored Link

OpenStack Bobcat : Ceilometer 利用方法 (Glance)2023/10/10

 
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                       
+--------------------------------------+----------------------------+----------------------------------
| 530698ed-413e-4bda-b02e-8f6f60380bd1 | instance                   | f30cd546632e484cb24414d832076... 
| 08fd4272-e83e-5e79-8a9a-05905598f8a5 | instance_network_interface | f30cd546632e484cb24414d832076... 
| 6b32c72e-9cef-54f0-9a38-dc657e110413 | instance_disk              | f30cd546632e484cb24414d832076... 
+--------------------------------------+----------------------------+----------------------------------

root@dlp ~(keystone)#
openstack image list

+--------------------------------------+------------+--------+
| ID                                   | Name       | Status |
+--------------------------------------+------------+--------+
| 2216b5ad-eeb5-4b9a-b862-60b84fdfee1c | Ubuntu2204 | active |
+--------------------------------------+------------+--------+

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

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

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

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

# リソース一覧

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

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| 530698ed-413e-4bda-b02e-8f6f60380bd1 | instance                   | f30cd546632e484cb24414d832076... 
| 08fd4272-e83e-5e79-8a9a-05905598f8a5 | instance_network_interface | f30cd546632e484cb24414d832076... 
| 6b32c72e-9cef-54f0-9a38-dc657e110413 | instance_disk              | f30cd546632e484cb24414d832076... 
| d8ba4d4c-0ead-4624-9ae4-d8c706faec31 | image                      | 39e8c6d7a2d14ee581902f0703a53... 
+--------------------------------------+----------------------------+----------------------------------

# [image] リソース詳細

root@dlp ~(keystone)#
openstack metric resource show d8ba4d4c-0ead-4624-9ae4-d8c706faec31

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | 04b6d7802d9043cbb09ceb31fd68987b                                  |
| created_by_user_id    | 1a0486c8d8664739b082ae0c97fa0cc3                                  |
| creator               | 1a0486c8d8664739b082ae0c97fa0cc3:04b6d7802d9043cbb09ceb31fd68987b |
| ended_at              | None                                                              |
| id                    | d8ba4d4c-0ead-4624-9ae4-d8c706faec31                              |
| metrics               | image.size: 4238338b-cffe-4748-a138-7ff85b930cf5                  |
| original_resource_id  | d8ba4d4c-0ead-4624-9ae4-d8c706faec31                              |
| project_id            | 39e8c6d7a2d14ee581902f0703a53b66                                  |
| revision_end          | None                                                              |
| revision_start        | 2023-10-10T00:27:17.045819+00:00                                  |
| started_at            | 2023-10-10T00:27:17.045814+00:00                                  |
| type                  | image                                                             |
| user_id               | None                                                              |
+-----------------------+-------------------------------------------------------------------+

# イメージ サイズ データ

root@dlp ~(keystone)#
openstack metric measures show 4238338b-cffe-4748-a138-7ff85b930cf5

+---------------------------+-------------+-------------+
| timestamp                 | granularity |       value |
+---------------------------+-------------+-------------+
| 2023-10-10T09:25:00+09:00 |       300.0 | 675610624.0 |
+---------------------------+-------------+-------------+
関連コンテンツ