Ubuntu 18.04
Sponsored Link

OpenStack Rocky : Ceilometer 利用方法(Cinder)2018/09/18

 
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                       
+--------------------------------------+----------------------------+----------------------------------
| e402a282-c5ae-4532-ad08-0a2f0d7803ac | instance                   | 5f54b0ad76274f06b13f29458cc1c... 
| 79195be1-3b66-4601-8401-489f4d7b4ee5 | instance                   | 5f54b0ad76274f06b13f29458cc1c... 
| eb34c91e-e69b-5bc5-b01b-97a0ee76832d | instance_network_interface | 5f54b0ad76274f06b13f29458cc1c... 
| 9887d1b9-c33e-5346-bc51-712db41a50f6 | instance_disk              | 5f54b0ad76274f06b13f29458cc1c... 
+--------------------------------------+----------------------------+----------------------------------

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

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

# リソース一覧

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

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| e402a282-c5ae-4532-ad08-0a2f0d7803ac | instance                   | 5f54b0ad76274f06b13f29458cc1c... 
| 79195be1-3b66-4601-8401-489f4d7b4ee5 | instance                   | 5f54b0ad76274f06b13f29458cc1c... 
| eb34c91e-e69b-5bc5-b01b-97a0ee76832d | instance_network_interface | 5f54b0ad76274f06b13f29458cc1c... 
| 9887d1b9-c33e-5346-bc51-712db41a50f6 | instance_disk              | 5f54b0ad76274f06b13f29458cc1c... 
| 28baad07-9887-4a18-a9a2-1b683f445c7e | volume                     | 5f54b0ad76274f06b13f29458cc1c... 
+--------------------------------------+----------------------------+----------------------------------

# volume リソース詳細

ubuntu@dlp ~(keystone)$
openstack metric resource show 28baad07-9887-4a18-a9a2-1b683f445c7e

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | aaeee626080841a491235fb06e77f10c                                  |
| created_by_user_id    | 1473e02cb8754787a0a9e47dd7d8e0ce                                  |
| creator               | 1473e02cb8754787a0a9e47dd7d8e0ce:aaeee626080841a491235fb06e77f10c |
| ended_at              | None                                                              |
| id                    | 28baad07-9887-4a18-a9a2-1b683f445c7e                              |
| metrics               | volume.size: 9e82f0a9-90b4-4ebc-acab-e48a6289f106                 |
| original_resource_id  | 28baad07-9887-4a18-a9a2-1b683f445c7e                              |
| project_id            | 5f54b0ad76274f06b13f29458cc1c036                                  |
| revision_end          | None                                                              |
| revision_start        | 2018-09-18T08:06:25.514476+00:00                                  |
| started_at            | 2018-09-18T08:06:25.514453+00:00                                  |
| type                  | volume                                                            |
| user_id               | 54951d6863024516a19ed9bda53be12f                                  |
+-----------------------+-------------------------------------------------------------------+

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

ubuntu@dlp ~(keystone)$
openstack metric measures show 9e82f0a9-90b4-4ebc-acab-e48a6289f106

+---------------------------+-------------+-------+
| timestamp                 | granularity | value |
+---------------------------+-------------+-------+
| 2018-09-18T17:05:00+09:00 |       300.0 |  10.0 |
+---------------------------+-------------+-------+
関連コンテンツ