Ubuntu 20.04
Sponsored Link

OpenStack Victoria : Ceilometer 利用方法 (Cinder)2020/10/22

 
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 apache2 cinder-scheduler

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

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

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| 10abf4e3-d5d9-4b57-a5a0-7cb767442dcc | instance                   | 6c44eafd4f614985bf74b94f2aee8... 
| c96d50ae-df9a-58f4-acb8-d3fbfad117dd | instance_disk              | 6c44eafd4f614985bf74b94f2aee8... 
| 103be51a-14ae-5fc4-8f0b-9b7458fc1bc1 | instance_network_interface | 6c44eafd4f614985bf74b94f2aee8... 
+--------------------------------------+----------------------------+----------------------------------

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

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

# リソース一覧

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

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| 10abf4e3-d5d9-4b57-a5a0-7cb767442dcc | instance                   | 6c44eafd4f614985bf74b94f2aee8... 
| c96d50ae-df9a-58f4-acb8-d3fbfad117dd | instance_disk              | 6c44eafd4f614985bf74b94f2aee8... 
| 103be51a-14ae-5fc4-8f0b-9b7458fc1bc1 | instance_network_interface | 6c44eafd4f614985bf74b94f2aee8... 
| 67abc6ef-5b6f-4c30-9a01-cdb62f351212 | volume                     | 6c44eafd4f614985bf74b94f2aee8... 
+--------------------------------------+----------------------------+----------------------------------

# [volume] リソース詳細

ubuntu@dlp ~(keystone)$
openstack metric resource show 67abc6ef-5b6f-4c30-9a01-cdb62f351212

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | 37197271a1954ddb90207a95d5f46488                                  |
| created_by_user_id    | a954b69f9b8345d9a797abbc0a949108                                  |
| creator               | a954b69f9b8345d9a797abbc0a949108:37197271a1954ddb90207a95d5f46488 |
| ended_at              | None                                                              |
| id                    | 67abc6ef-5b6f-4c30-9a01-cdb62f351212                              |
| metrics               | volume.size: 3b6e4bac-0cf8-4304-af7e-a6776494fb6f                 |
| original_resource_id  | 67abc6ef-5b6f-4c30-9a01-cdb62f351212                              |
| project_id            | 6c44eafd4f614985bf74b94f2aee82fb                                  |
| revision_end          | None                                                              |
| revision_start        | 2020-10-22T01:41:16.549231+00:00                                  |
| started_at            | 2020-10-22T01:41:16.549224+00:00                                  |
| type                  | volume                                                            |
| user_id               | a13cfae0e5eb466fae71a636a6ffb6b4                                  |
+-----------------------+-------------------------------------------------------------------+

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

ubuntu@dlp ~(keystone)$
openstack metric measures show 3b6e4bac-0cf8-4304-af7e-a6776494fb6f

+---------------------------+-------------+-------+
| timestamp                 | granularity | value |
+---------------------------+-------------+-------+
| 2020-10-22T10:40:00+09:00 |       300.0 |  10.0 |
+---------------------------+-------------+-------+
関連コンテンツ