Ubuntu 20.04
Sponsored Link

OpenStack Xena : Ceilometer 利用方法 (Cinder)2021/10/11

 
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                       
+--------------------------------------+----------------------------+----------------------------------
| 4699d575-1d94-4024-8323-9dfa3599c8d2 | instance                   | facc545a7f9e4218884c40169158a... 
| 75d568e7-b47a-54a2-911e-5c189f4c75c8 | instance_disk              | facc545a7f9e4218884c40169158a... 
| 2d65a40a-ec43-58ad-bfd9-c5b4df1059ae | instance_network_interface | facc545a7f9e4218884c40169158a... 
+--------------------------------------+----------------------------+----------------------------------

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

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

# リソース一覧

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

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| 4699d575-1d94-4024-8323-9dfa3599c8d2 | instance                   | facc545a7f9e4218884c40169158a... 
| 75d568e7-b47a-54a2-911e-5c189f4c75c8 | instance_disk              | facc545a7f9e4218884c40169158a... 
| 2d65a40a-ec43-58ad-bfd9-c5b4df1059ae | instance_network_interface | facc545a7f9e4218884c40169158a... 
| 8d0c79cd-6f6c-4b7a-93df-36ad398ea307 | volume                     | facc545a7f9e4218884c40169158a... 
+--------------------------------------+----------------------------+----------------------------------

# [volume] リソース詳細

ubuntu@dlp ~(keystone)$
openstack metric resource show 8d0c79cd-6f6c-4b7a-93df-36ad398ea307

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | 611e3ba8938b475fb9dd8124603f18d3                                  |
| created_by_user_id    | 6f2ebeebee50478588d34251b7770183                                  |
| creator               | 6f2ebeebee50478588d34251b7770183:611e3ba8938b475fb9dd8124603f18d3 |
| ended_at              | None                                                              |
| id                    | 8d0c79cd-6f6c-4b7a-93df-36ad398ea307                              |
| metrics               | volume.size: c1ba2350-5abf-4b6d-8b50-487b28bd89de                 |
| original_resource_id  | 8d0c79cd-6f6c-4b7a-93df-36ad398ea307                              |
| project_id            | facc545a7f9e4218884c40169158a2dc                                  |
| revision_end          | None                                                              |
| revision_start        | 2021-10-11T05:37:55.895909+00:00                                  |
| started_at            | 2021-10-11T05:37:55.895902+00:00                                  |
| type                  | volume                                                            |
| user_id               | f5a7ffdd6e54434badbd75ba0e6d6ac2                                  |
+-----------------------+-------------------------------------------------------------------+

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

ubuntu@dlp ~(keystone)$
openstack metric measures show c1ba2350-5abf-4b6d-8b50-487b28bd89de

+---------------------------+-------------+-------+
| timestamp                 | granularity | value |
+---------------------------+-------------+-------+
| 2021-10-11T14:35:00+09:00 |       300.0 |  10.0 |
+---------------------------+-------------+-------+
関連コンテンツ