Debian 11 Bullseye
Sponsored Link

OpenStack Victoria : Ceilometer 利用方法 (Cinder)2021/09/02

 
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  |   |      Linux Bridge     |   |        Libvirt        |
|  Memcached  httpd     |   |        L2 Agent       |   |     Nova Compute      |
|  Keystone   Glance    |   |        L3 Agent       |   |      Linux Bridge     |
|  Nova_API  Cinder_API |   |     Metadata Agent    |   |        L2 Agent       |
|  Neutron Server       |   |     Cinder Volume     |   |   Ceilometer Compute  |
|  Metadata Agent       |   |        Heat API       |   |                       |
|                       |   |      Heat Engine      |   |                       |
|                       |   |    Gnocchi  httpd     |   |                       |
|                       |   |   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 cinder-api cinder-scheduler

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

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

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| 86981ae7-d713-414f-966c-ac22387a3226 | instance                   | cba75a02a921457db62b660f3d0b5... 
| 0697ef58-ac47-5747-bdeb-d4a60a3f068c | instance_disk              | cba75a02a921457db62b660f3d0b5... 
| 6d90e531-c30c-5aa3-bdd2-2b43032ef4cf | instance_network_interface | cba75a02a921457db62b660f3d0b5... 
+--------------------------------------+----------------------------+----------------------------------

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

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

# リソース一覧

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

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| 86981ae7-d713-414f-966c-ac22387a3226 | instance                   | cba75a02a921457db62b660f3d0b5... 
| 0697ef58-ac47-5747-bdeb-d4a60a3f068c | instance_disk              | cba75a02a921457db62b660f3d0b5... 
| 6d90e531-c30c-5aa3-bdd2-2b43032ef4cf | instance_network_interface | cba75a02a921457db62b660f3d0b5... 
| 884d1da6-bf6b-4657-952a-adc354f18a96 | volume                     | cba75a02a921457db62b660f3d0b5... 
+--------------------------------------+----------------------------+----------------------------------

# [volume] リソース詳細

debian@dlp ~(keystone)$
openstack metric resource show 884d1da6-bf6b-4657-952a-adc354f18a96

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | 1718217eee4b4f2ea143d65122864fe0                                  |
| created_by_user_id    | 64e62f8bd1714a02998bdd2c3015f940                                  |
| creator               | 64e62f8bd1714a02998bdd2c3015f940:1718217eee4b4f2ea143d65122864fe0 |
| ended_at              | None                                                              |
| id                    | 884d1da6-bf6b-4657-952a-adc354f18a96                              |
| metrics               | volume.size: 3011a15b-c751-4412-a12b-1145a232ba4c                 |
| original_resource_id  | 884d1da6-bf6b-4657-952a-adc354f18a96                              |
| project_id            | cba75a02a921457db62b660f3d0b57c4                                  |
| revision_end          | None                                                              |
| revision_start        | 2021-09-02T06:01:57.423487+00:00                                  |
| started_at            | 2021-09-02T06:01:57.423461+00:00                                  |
| type                  | volume                                                            |
| user_id               | 62a91aa559f64acab11861ed7cd51ecc                                  |
+-----------------------+-------------------------------------------------------------------+

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

debian@dlp ~(keystone)$
openstack metric measures show 3011a15b-c751-4412-a12b-1145a232ba4c

+---------------------------+-------------+-------+
| timestamp                 | granularity | value |
+---------------------------+-------------+-------+
| 2021-09-02T01:00:00-05:00 |       300.0 |  10.0 |
+---------------------------+-------------+-------+
関連コンテンツ