CentOS Stream 9
Sponsored Link

OpenStack Dalmatian : Ceilometer 利用方法 (Glance)2024/10/16

 

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

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

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

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| 3d753408-6705-4cbf-acd8-2e09d975b973 | instance                   | 756e2b4937c44d3991028e294f92d... 
| d9634b44-bf91-5f24-b3e9-a3f82258e684 | instance_disk              | 756e2b4937c44d3991028e294f92d... 
| 7a63d41b-5fef-566a-bc9d-e4881287698c | instance_network_interface | 756e2b4937c44d3991028e294f92d... 
+--------------------------------------+----------------------------+----------------------------------

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

+--------------------------------------+----------------+--------+
| ID                                   | Name           | Status |
+--------------------------------------+----------------+--------+
| 75e0d976-4075-4488-8f26-87d4a50aebe9 | CentOS-Stream9 | active |
+--------------------------------------+----------------+--------+

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

[root@dlp ~(keystone)]#
openstack image save --file centos-st9.qcow2 CentOS-Stream9

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

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

# リソース一覧

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

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| 3d753408-6705-4cbf-acd8-2e09d975b973 | instance                   | 756e2b4937c44d3991028e294f92d... 
| d9634b44-bf91-5f24-b3e9-a3f82258e684 | instance_disk              | 756e2b4937c44d3991028e294f92d... 
| 7a63d41b-5fef-566a-bc9d-e4881287698c | instance_network_interface | 756e2b4937c44d3991028e294f92d... 
| bb369ad7-fc00-4fa1-8817-5d1493d49f41 | image                      | b19d04cd37254937a4eaebcd0f0f0... 
+--------------------------------------+----------------------------+----------------------------------

# [image] リソース詳細

[root@dlp ~(keystone)]#
openstack metric resource show bb369ad7-fc00-4fa1-8817-5d1493d49f41

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | aff8e7e402dc4d9e849bbe0e34fa4538                                  |
| created_by_user_id    | 49ad0cbb8d944b8fbe748507c42d0702                                  |
| creator               | 49ad0cbb8d944b8fbe748507c42d0702:aff8e7e402dc4d9e849bbe0e34fa4538 |
| ended_at              | None                                                              |
| id                    | bb369ad7-fc00-4fa1-8817-5d1493d49f41                              |
| metrics               | image.size: ec6a0f0e-f183-4dde-b776-bf5110f80738                  |
| original_resource_id  | bb369ad7-fc00-4fa1-8817-5d1493d49f41                              |
| project_id            | b19d04cd37254937a4eaebcd0f0f0a43                                  |
| revision_end          | None                                                              |
| revision_start        | 2024-10-16T01:11:16.446649+00:00                                  |
| started_at            | 2024-10-16T01:11:16.446645+00:00                                  |
| type                  | image                                                             |
| user_id               | None                                                              |
+-----------------------+-------------------------------------------------------------------+

# イメージ サイズ データ

[root@dlp ~(keystone)]#
openstack metric measures show ec6a0f0e-f183-4dde-b776-bf5110f80738

+---------------------------+-------------+--------------+
| timestamp                 | granularity |        value |
+---------------------------+-------------+--------------+
| 2024-10-16T10:10:00+09:00 |       300.0 | 2560950272.0 |
+---------------------------+-------------+--------------+
関連コンテンツ