OpenStack Rocky : Ceilometer 利用方法(Cinder)2018/09/06 |
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 | | L2 Agent | | Nova Compute | | Keystone Glance | | L3 Agent | | Open vSwitch | | Nova API Cinder API | | Metadata Agent | | L2 Agent | | Neutron Server | | Cinder Volume | | Ceilometer Compute | | Metadata Agent | | Heat API | | | | Gnocchi | | Heat Engine | | | | 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 systemctl restart openstack-cinder-api openstack-cinder-scheduler |
[2] | 任意のユーザーでボリュームを作成した場合に収集されるデータの表示例です。 |
# リソース一覧 [cent@dlp ~(keystone)]$ openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | 45d4a9ba-d6ec-4263-a81c-487702f98e33 | instance | 3c9dc9d8d71149a7b835e1f5813d2... | bbdaa383-5531-57a5-b411-e991064fa095 | instance_network_interface | 3c9dc9d8d71149a7b835e1f5813d2... | f909ac06-3daa-566e-93d4-10141ad2ce8a | instance_disk | 3c9dc9d8d71149a7b835e1f5813d2... | 5b30f928-8834-4ab5-a5ce-760c48d4c9b7 | instance | 3c9dc9d8d71149a7b835e1f5813d2... +--------------------------------------+----------------------------+---------------------------------- # テストとしてボリューム作成 [cent@dlp ~(keystone)]$ openstack volume create --size 10 disk01 # リソース一覧 [cent@dlp ~(keystone)]$ openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | 45d4a9ba-d6ec-4263-a81c-487702f98e33 | instance | 3c9dc9d8d71149a7b835e1f5813d2... | bbdaa383-5531-57a5-b411-e991064fa095 | instance_network_interface | 3c9dc9d8d71149a7b835e1f5813d2... | f909ac06-3daa-566e-93d4-10141ad2ce8a | instance_disk | 3c9dc9d8d71149a7b835e1f5813d2... | 5b30f928-8834-4ab5-a5ce-760c48d4c9b7 | instance | 3c9dc9d8d71149a7b835e1f5813d2... | d3b89dac-7214-462c-9546-e5db05bd411a | volume | 3c9dc9d8d71149a7b835e1f5813d2... +--------------------------------------+----------------------------+---------------------------------- # リソース詳細 [cent@dlp ~(keystone)]$ openstack metric resource show d3b89dac-7214-462c-9546-e5db05bd411a +-----------------------+-------------------------------------------------------------------+ | Field | Value | +-----------------------+-------------------------------------------------------------------+ | created_by_project_id | ece4ac6c7e764a979e36ba0b2faf848e | | created_by_user_id | cfc889992c144012a0092b270bfa0fbd | | creator | cfc889992c144012a0092b270bfa0fbd:ece4ac6c7e764a979e36ba0b2faf848e | | ended_at | None | | id | d3b89dac-7214-462c-9546-e5db05bd411a | | metrics | volume.size: 505fbdf9-5a1d-4ce4-aeb5-fb074ef8c79e | | original_resource_id | d3b89dac-7214-462c-9546-e5db05bd411a | | project_id | 3c9dc9d8d71149a7b835e1f5813d2eb8 | | revision_end | None | | revision_start | 2018-09-06T06:01:14.315294+00:00 | | started_at | 2018-09-06T06:01:14.315220+00:00 | | type | volume | | user_id | e2252ff04be3409e8e823a0a3a925cad | +-----------------------+-------------------------------------------------------------------+ # ボリューム サイズ データ [cent@dlp ~(keystone)]$ openstack metric measures show 505fbdf9-5a1d-4ce4-aeb5-fb074ef8c79e +---------------------------+-------------+-------+ | timestamp | granularity | value | +---------------------------+-------------+-------+ | 2018-09-06T15:00:00+09:00 | 300.0 | 10.0 | +---------------------------+-------------+-------+ |
Sponsored Link |