CentOS Stream 9
Sponsored Link

OpenStack Antelope : Ceilometer 利用方法 (Cinder)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] Block Storage サービスの各種データ収集を有効にするには、Cinder を以下のように設定します。
Cinder 関連サービスが稼働する全ノードで設定変更します。
[root@dlp ~(keystone)]#
vi /etc/cinder/cinder.conf
# 最終行へ追記

[oslo_messaging_notifications]
driver = messagingv2
transport_url = rabbit://openstack:password@dlp.srv.world
[root@dlp ~(keystone)]#
systemctl restart openstack-cinder-api openstack-cinder-scheduler

[2] 任意のユーザーでボリュームを作成した場合に収集されるデータの表示例です。
# リソース一覧

[cent@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... 
+--------------------------------------+----------------------------+----------------------------------

# テストとしてボリューム作成

[cent@dlp ~(keystone)]$
openstack volume create --size 10 disk01

# リソース一覧

[cent@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... 
| 0c22c348-b697-4791-ac73-cdcbb5f814fa | volume                     | 40aa0807595447f0bd8d5b2dbfa18... 
+--------------------------------------+----------------------------+----------------------------------

# [volume] リソース詳細

[cent@dlp ~(keystone)]$
openstack metric resource show 0c22c348-b697-4791-ac73-cdcbb5f814fa

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | 6d680c2574034967ab496a59d1319a65                                  |
| created_by_user_id    | 372e97ed646e48ddb41c769a446d2094                                  |
| creator               | 372e97ed646e48ddb41c769a446d2094:6d680c2574034967ab496a59d1319a65 |
| ended_at              | None                                                              |
| id                    | 0c22c348-b697-4791-ac73-cdcbb5f814fa                              |
| metrics               | volume.size: c426b910-de86-4810-be7e-d78d1eec1172                 |
| original_resource_id  | 0c22c348-b697-4791-ac73-cdcbb5f814fa                              |
| project_id            | 40aa0807595447f0bd8d5b2dbfa1839b                                  |
| revision_end          | None                                                              |
| revision_start        | 2023-04-20T01:31:34.171327+00:00                                  |
| started_at            | 2023-04-20T01:31:34.171321+00:00                                  |
| type                  | volume                                                            |
| user_id               | 3c87f0d4e2e6413aa110a4240357cd97                                  |
+-----------------------+-------------------------------------------------------------------+

# ボリューム サイズ データ

[cent@dlp ~(keystone)]$
openstack metric measures show c426b910-de86-4810-be7e-d78d1eec1172

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