Ubuntu 22.04
Sponsored Link

OpenStack Zed : Ceilometer 利用方法 (Cinder)
2022/10/11
 
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 apache2 cinder-scheduler

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

ubuntu@dlp ~(keystone)$
openstack metric resource list

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| a456ee32-b105-4c5e-8eae-ddccb48f913e | instance                   | 4dd1e1f6bac441ff9c77002c3ab4c58a 
| dff4e871-53dc-5531-a1f2-3da5e7f69191 | instance_network_interface | 4dd1e1f6bac441ff9c77002c3ab4c58a 
| d90cfa81-9edd-51cb-8521-ac01203c3797 | instance_disk              | 4dd1e1f6bac441ff9c77002c3ab4c58a 
+--------------------------------------+----------------------------+----------------------------------

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

ubuntu@dlp ~(keystone)$
openstack volume create --size 10 disk01

# リソース一覧

ubuntu@dlp ~(keystone)$
openstack metric resource list

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| a456ee32-b105-4c5e-8eae-ddccb48f913e | instance                   | 4dd1e1f6bac441ff9c77002c3ab4c58a 
| dff4e871-53dc-5531-a1f2-3da5e7f69191 | instance_network_interface | 4dd1e1f6bac441ff9c77002c3ab4c58a 
| d90cfa81-9edd-51cb-8521-ac01203c3797 | instance_disk              | 4dd1e1f6bac441ff9c77002c3ab4c58a 
| 303c417d-095c-4d30-a785-8831993d17e3 | volume                     | 4dd1e1f6bac441ff9c77002c3ab4c58a 
+--------------------------------------+----------------------------+----------------------------------

# [volume] リソース詳細

ubuntu@dlp ~(keystone)$
openstack metric resource show 303c417d-095c-4d30-a785-8831993d17e3

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | ee51c09c765e4a4d958c2bcc4dbb5665                                  |
| created_by_user_id    | 1070f194127a4a52aca630dab3365662                                  |
| creator               | 1070f194127a4a52aca630dab3365662:ee51c09c765e4a4d958c2bcc4dbb5665 |
| ended_at              | None                                                              |
| id                    | 303c417d-095c-4d30-a785-8831993d17e3                              |
| metrics               | volume.size: 6785e117-fef4-4b66-8f67-e852cf4f9890                 |
| original_resource_id  | 303c417d-095c-4d30-a785-8831993d17e3                              |
| project_id            | 4dd1e1f6bac441ff9c77002c3ab4c58a                                  |
| revision_end          | None                                                              |
| revision_start        | 2022-10-11T00:50:24.721777+00:00                                  |
| started_at            | 2022-10-11T00:50:24.721772+00:00                                  |
| type                  | volume                                                            |
| user_id               | 9345b7f4de21427abf31ad308cf952f8                                  |
+-----------------------+-------------------------------------------------------------------+

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

ubuntu@dlp ~(keystone)$
openstack metric measures show 6785e117-fef4-4b66-8f67-e852cf4f9890

+---------------------------+-------------+-------+
| timestamp                 | granularity | value |
+---------------------------+-------------+-------+
| 2022-10-11T00:50:00+00:00 |       300.0 |  10.0 |
+---------------------------+-------------+-------+
関連コンテンツ