CentOS Stream 9
Sponsored Link

OpenStack Caracal : Ceilometer 利用方法 (Glance)2024/08/08

 

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                       
+--------------------------------------+----------------------------+----------------------------------
| 1d0c2140-098d-4a1a-a705-82d7755d7c84 | instance                   | 03a31c43ede44dcbaacb05c870920... 
| 1e69e83f-7283-58a2-a1f2-18093aad665d | instance_network_interface | 03a31c43ede44dcbaacb05c870920... 
| 5770e056-a76c-5bba-9b71-aef9fdefd317 | instance_disk              | 03a31c43ede44dcbaacb05c870920... 
+--------------------------------------+----------------------------+----------------------------------

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

+--------------------------------------+----------------+--------+
| ID                                   | Name           | Status |
+--------------------------------------+----------------+--------+
| cfa9783d-ca91-4e3b-8016-81e3336bd5f0 | 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                       
+--------------------------------------+----------------------------+----------------------------------
| 1d0c2140-098d-4a1a-a705-82d7755d7c84 | instance                   | 03a31c43ede44dcbaacb05c870920... 
| 1e69e83f-7283-58a2-a1f2-18093aad665d | instance_network_interface | 03a31c43ede44dcbaacb05c870920... 
| 5770e056-a76c-5bba-9b71-aef9fdefd317 | instance_disk              | 03a31c43ede44dcbaacb05c870920... 
| b5fb6c70-9b73-4dfc-9b89-d485e77726c4 | image                      | b62e60c6d4b7406a90eee2f2d9c45... 
+--------------------------------------+----------------------------+----------------------------------

# [image] リソース詳細

[root@dlp ~(keystone)]#
openstack metric resource show b5fb6c70-9b73-4dfc-9b89-d485e77726c4

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | 0b826f1bf49d489494e94badc32f2cea                                  |
| created_by_user_id    | c35246b749884d4fae8a3bfaaa0cf7ea                                  |
| creator               | c35246b749884d4fae8a3bfaaa0cf7ea:0b826f1bf49d489494e94badc32f2cea |
| ended_at              | None                                                              |
| id                    | b5fb6c70-9b73-4dfc-9b89-d485e77726c4                              |
| metrics               | image.size: 9e8bf684-e434-4d80-b794-dc88a71da131                  |
| original_resource_id  | b5fb6c70-9b73-4dfc-9b89-d485e77726c4                              |
| project_id            | b62e60c6d4b7406a90eee2f2d9c45917                                  |
| revision_end          | None                                                              |
| revision_start        | 2024-08-07T10:01:43.625080+00:00                                  |
| started_at            | 2024-08-07T10:01:43.625074+00:00                                  |
| type                  | image                                                             |
| user_id               | None                                                              |
+-----------------------+-------------------------------------------------------------------+

# イメージ サイズ データ

[root@dlp ~(keystone)]#
openstack metric measures show 9e8bf684-e434-4d80-b794-dc88a71da131

+---------------------------+-------------+--------------+
| timestamp                 | granularity |        value |
+---------------------------+-------------+--------------+
| 2024-08-07T19:00:00+09:00 |       300.0 | 3832545280.0 |
+---------------------------+-------------+--------------+
関連コンテンツ