CentOS Stream 8
Sponsored Link

OpenStack Victoria : Ceilometer 利用方法 (Cinder)2021/03/30

 
OpenStack Telemetry Service (Ceilometer) の利用方法です。
当例では以下のような環境を例に Ceilometer サービスをインストールしています。
------------+---------------------------+---------------------------+------------
            |                           |                           |
        eth0|10.0.0.30              eth0|10.0.0.50              eth0|10.0.0.51
+-----------+-----------+   +-----------+-----------+   +-----------+-----------+
|    [ Control Node ]   |   |    [ Network 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           |   |      iSCSI Target     |   |     OVN-Controller    |
|  Gnocchi              |   |     Heat API/Engine   |   |   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 openstack-cinder-api openstack-cinder-scheduler

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

[cent@dlp ~(keystone)]$
openstack metric resource list

+--------------------------------------+----------------------------+-----------------------------------
| id                                   | type                       | project_id                        
+--------------------------------------+----------------------------+-----------------------------------
| da1c8adc-4733-4ee5-a654-49d652a6aaa3 | instance                   | f1f04d774d2141fb9acabd28d0e00c... 
| 21b1221b-a0db-5f1c-8c92-ae02f7064202 | instance_disk              | f1f04d774d2141fb9acabd28d0e00c... 
| 23721353-784e-571f-9f47-fecb17e1c51d | instance_network_interface | f1f04d774d2141fb9acabd28d0e00c... 
+--------------------------------------+----------------------------+-----------------------------------

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

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

# リソース一覧

[cent@dlp ~(keystone)]$
openstack metric resource list

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| da1c8adc-4733-4ee5-a654-49d652a6aaa3 | instance                   | f1f04d774d2141fb9acabd28d0e00... 
| 21b1221b-a0db-5f1c-8c92-ae02f7064202 | instance_disk              | f1f04d774d2141fb9acabd28d0e00... 
| 23721353-784e-571f-9f47-fecb17e1c51d | instance_network_interface | f1f04d774d2141fb9acabd28d0e00... 
| 80668d46-d3a5-443a-aaf1-e2e9a1879dd8 | volume                     | f1f04d774d2141fb9acabd28d0e00... 
+--------------------------------------+----------------------------+----------------------------------

# [volume] リソース詳細

[cent@dlp ~(keystone)]$
openstack metric resource show 80668d46-d3a5-443a-aaf1-e2e9a1879dd8

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | affa3a6446154e37adfd233c437bacc1                                  |
| created_by_user_id    | 66a09b5dee7b451fb4cb4216ef7067be                                  |
| creator               | 66a09b5dee7b451fb4cb4216ef7067be:affa3a6446154e37adfd233c437bacc1 |
| ended_at              | None                                                              |
| id                    | 80668d46-d3a5-443a-aaf1-e2e9a1879dd8                              |
| metrics               | volume.size: 37992e16-c150-421c-b2cb-ccf4968ed748                 |
| original_resource_id  | 80668d46-d3a5-443a-aaf1-e2e9a1879dd8                              |
| project_id            | f1f04d774d2141fb9acabd28d0e00c33                                  |
| revision_end          | None                                                              |
| revision_start        | 2021-03-30T07:31:23.144140+00:00                                  |
| started_at            | 2021-03-30T07:31:23.144134+00:00                                  |
| type                  | volume                                                            |
| user_id               | e08c35de3b6746bd9518c97f7068a71e                                  |
+-----------------------+-------------------------------------------------------------------+

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

[cent@dlp ~(keystone)]$
openstack metric measures show 37992e16-c150-421c-b2cb-ccf4968ed748

+---------------------------+-------------+-------+
| timestamp                 | granularity | value |
+---------------------------+-------------+-------+
| 2021-03-30T16:30:00+09:00 |       300.0 |  10.0 |
+---------------------------+-------------+-------+
関連コンテンツ