Ubuntu 20.04
Sponsored Link

OpenStack Yoga : Ceilometer 利用方法 (Cinder)2022/04/12

 
OpenStack Telemetry Service (Ceilometer) の利用方法です。
当例では以下のような環境を例に Ceilometer サービスをインストールしています。
------------+---------------------------+---------------------------+------------
            |                           |                           |
        eth0|10.0.0.30              eth0|10.0.0.50              eth0|10.0.0.51
+-----------+-----------+   +-----------+-----------+   +-----------+-----------+
|    [ Control Node ]   |   |    [ Storage Node ]   |   |    [ Compute Node ]   |
|                       |   |                       |   |                       |
|  MariaDB    RabbitMQ  |   |      Open vSwitch     |   |        Libvirt        |
|  Memcached  httpd     |   |     Neutron Server    |   |     Nova Compute      |
|  Keystone   Glance    |   |       OVN-Northd      |   |      Open vSwitch     |
|  Nova API             |   |     Cinder Volume     |   |   OVN Metadata Agent  |
|  Cinder API           |   |    Heat API/Engine    |   |     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@10.0.0.30
root@dlp ~(keystone)#
systemctl restart apache2 cinder-scheduler

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

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

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| 7ea894ee-3a91-4541-96ba-717ff45917c5 | instance                   | d3434f55aa5541cfab5f13916da06... 
| 250af39c-0514-5aab-b416-7f01b8b01e19 | instance_disk              | d3434f55aa5541cfab5f13916da06... 
| cb389274-fbb8-536a-9df0-a8d5d6bc8a2f | instance_network_interface | d3434f55aa5541cfab5f13916da06... 
+--------------------------------------+----------------------------+----------------------------------

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

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

# リソース一覧

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

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| 7ea894ee-3a91-4541-96ba-717ff45917c5 | instance                   | d3434f55aa5541cfab5f13916da0697d 
| 250af39c-0514-5aab-b416-7f01b8b01e19 | instance_disk              | d3434f55aa5541cfab5f13916da0697d 
| cb389274-fbb8-536a-9df0-a8d5d6bc8a2f | instance_network_interface | d3434f55aa5541cfab5f13916da0697d 
| 0875aa46-3e39-4e37-9720-e850f5e7beec | volume                     | d3434f55aa5541cfab5f13916da0697d 
+--------------------------------------+----------------------------+----------------------------------

# [volume] リソース詳細

ubuntu@dlp ~(keystone)$
openstack metric resource show 0875aa46-3e39-4e37-9720-e850f5e7beec

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | c043fb355eff47e69642adfcd7a55620                                  |
| created_by_user_id    | 4dde18e4717d4936ad5dea946de3d41f                                  |
| creator               | 4dde18e4717d4936ad5dea946de3d41f:c043fb355eff47e69642adfcd7a55620 |
| ended_at              | None                                                              |
| id                    | 0875aa46-3e39-4e37-9720-e850f5e7beec                              |
| metrics               | volume.size: 1fe73c47-2f3e-48b3-be9f-8c807f4cce7d                 |
| original_resource_id  | 0875aa46-3e39-4e37-9720-e850f5e7beec                              |
| project_id            | d3434f55aa5541cfab5f13916da0697d                                  |
| revision_end          | None                                                              |
| revision_start        | 2022-04-12T00:42:59.909416+00:00                                  |
| started_at            | 2022-04-12T00:42:59.909409+00:00                                  |
| type                  | volume                                                            |
| user_id               | 95f196a1851c4b93b016871f7d5ded82                                  |
+-----------------------+-------------------------------------------------------------------+

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

ubuntu@dlp ~(keystone)$
openstack metric measures show 1fe73c47-2f3e-48b3-be9f-8c807f4cce7d

+---------------------------+-------------+-------+
| timestamp                 | granularity | value |
+---------------------------+-------------+-------+
| 2022-04-12T09:40:00+09:00 |       300.0 |  10.0 |
+---------------------------+-------------+-------+
関連コンテンツ