CentOS Stream 9
Sponsored Link

OpenStack Antelope : Ceilometer 利用方法 (Glance)2023/04/20

 
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                       
+--------------------------------------+----------------------------+----------------------------------
| 284a5b69-7b76-49c3-8180-c9b22284d429 | instance                   | 40aa0807595447f0bd8d5b2dbfa18... 
| 9e9a6284-5040-5642-ba3b-25542d7f87ac | instance_disk              | 40aa0807595447f0bd8d5b2dbfa18... 
| 783023d9-7b04-538f-9a5e-74098a7da99a | instance_network_interface | 40aa0807595447f0bd8d5b2dbfa18... 
+--------------------------------------+----------------------------+----------------------------------

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

+--------------------------------------+----------------+--------+
| ID                                   | Name           | Status |
+--------------------------------------+----------------+--------+
| 17d50b54-c009-45ff-96ed-58086f79065f | 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                       
+--------------------------------------+----------------------------+----------------------------------
| 284a5b69-7b76-49c3-8180-c9b22284d429 | instance                   | 40aa0807595447f0bd8d5b2dbfa18... 
| 9e9a6284-5040-5642-ba3b-25542d7f87ac | instance_disk              | 40aa0807595447f0bd8d5b2dbfa18... 
| 783023d9-7b04-538f-9a5e-74098a7da99a | instance_network_interface | 40aa0807595447f0bd8d5b2dbfa18... 
| 2203c888-763a-4b28-9fc4-f61fb5b6d152 | image                      | fa1902e20298477e9e065c0a330e1... 
+--------------------------------------+----------------------------+----------------------------------

# [image] リソース詳細

[root@dlp ~(keystone)]#
openstack metric resource show 2203c888-763a-4b28-9fc4-f61fb5b6d152

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | 6d680c2574034967ab496a59d1319a65                                  |
| created_by_user_id    | 372e97ed646e48ddb41c769a446d2094                                  |
| creator               | 372e97ed646e48ddb41c769a446d2094:6d680c2574034967ab496a59d1319a65 |
| ended_at              | None                                                              |
| id                    | 2203c888-763a-4b28-9fc4-f61fb5b6d152                              |
| metrics               | image.size: 7f2dd5b2-700c-4418-83ce-c29a2fa3aca5                  |
| original_resource_id  | 2203c888-763a-4b28-9fc4-f61fb5b6d152                              |
| project_id            | fa1902e20298477e9e065c0a330e1b6f                                  |
| revision_end          | None                                                              |
| revision_start        | 2023-04-20T01:26:03.799009+00:00                                  |
| started_at            | 2023-04-20T01:26:03.799003+00:00                                  |
| type                  | image                                                             |
| user_id               | None                                                              |
+-----------------------+-------------------------------------------------------------------+

# イメージ サイズ データ

[root@dlp ~(keystone)]#
openstack metric measures show 7f2dd5b2-700c-4418-83ce-c29a2fa3aca5

+---------------------------+-------------+--------------+
| timestamp                 | granularity |        value |
+---------------------------+-------------+--------------+
| 2023-04-20T10:25:00+09:00 |       300.0 | 2989621248.0 |
+---------------------------+-------------+--------------+
関連コンテンツ