OpenStack Stein : Ceilometer 利用方法(Glance)2019/05/17 |
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] | Image サービスの各種データ収集を有効にするには、Glance を以下のように設定します。 |
[root@dlp ~(keystone)]#
vi /etc/glance/glance-api.conf # 最終行へ追記 [oslo_messaging_notifications] driver = messagingv2 # RabbitMQ 接続情報 transport_url = rabbit://openstack:password@10.0.0.30 systemctl restart openstack-glance-api |
[2] | イメージを追加等した場合に収集されるデータの表示例です。 |
# リソース一覧 [root@dlp ~(keystone)]# openstack metric resource list +--------------------------------------+----------------------------+----------------------------------+----------- | id | type | project_id | user_id +--------------------------------------+----------------------------+----------------------------------+----------- | aced428a-2d16-4679-9798-50e69c7aaf1d | instance | caab6ec580994e6481cd104b9d210f3f | b5dd128... | 549a0c66-9dd0-5356-90c8-c742f46d46ca | instance_network_interface | caab6ec580994e6481cd104b9d210f3f | b5dd128... | 291bfeb0-05f2-5918-8a0d-be2e6fdc0f6f | instance_disk | caab6ec580994e6481cd104b9d210f3f | b5dd128... | a2e7b8cf-003d-4431-a4cc-c898169645d6 | instance | caab6ec580994e6481cd104b9d210f3f | b5dd128... +--------------------------------------+----------------------------+----------------------------------+----------- # テストとしてイメージ登録 [root@dlp ~(keystone)]# openstack image create "CentOS76" --file centos76.qcow2 --disk-format qcow2 --container-format bare --public # テストとしてイメージダウンロード [root@dlp ~(keystone)]# openstack image save --file centos7.qcow2 CentOS76 # リソース一覧 [root@dlp ~(keystone)]# openstack metric resource list +--------------------------------------+----------------------------+----------------------------------+-------------- | id | type | project_id | user_id +--------------------------------------+----------------------------+----------------------------------+-------------- | aced428a-2d16-4679-9798-50e69c7aaf1d | instance | caab6ec580994e6481cd104b9d210f3f | b5dd128c2f... | 549a0c66-9dd0-5356-90c8-c742f46d46ca | instance_network_interface | caab6ec580994e6481cd104b9d210f3f | b5dd128c2f... | 291bfeb0-05f2-5918-8a0d-be2e6fdc0f6f | instance_disk | caab6ec580994e6481cd104b9d210f3f | b5dd128c2f... | a2e7b8cf-003d-4431-a4cc-c898169645d6 | instance | caab6ec580994e6481cd104b9d210f3f | b5dd128c2f... | b158e164-0752-42c7-983f-fc16e58692b0 | image | 183a5ed32a77427986038c176b605d73 | None +--------------------------------------+----------------------------+----------------------------------+-------------- # リソース詳細 [root@dlp ~(keystone)]# openstack metric resource show b158e164-0752-42c7-983f-fc16e58692b0 +-----------------------+-------------------------------------------------------------------+ | Field | Value | +-----------------------+-------------------------------------------------------------------+ | created_by_project_id | c5e87c9b460e4f16801b4102019c97e6 | | created_by_user_id | afc534e952064ca2b16fc3e242c15665 | | creator | afc534e952064ca2b16fc3e242c15665:c5e87c9b460e4f16801b4102019c97e6 | | ended_at | None | | id | b158e164-0752-42c7-983f-fc16e58692b0 | | metrics | image.download: c9671729-d54a-4a49-910f-f3188f86efa3 | | | image.serve: 5b7fb72e-83cf-4bab-9773-9fd238458398 | | | image.size: 79f3aff5-6af4-469a-bcaf-d9fb86437265 | | original_resource_id | b158e164-0752-42c7-983f-fc16e58692b0 | | project_id | 183a5ed32a77427986038c176b605d73 | | revision_end | None | | revision_start | 2019-05-17T06:51:10.153899+00:00 | | started_at | 2019-05-17T06:51:10.153857+00:00 | | type | image | | user_id | None | +-----------------------+-------------------------------------------------------------------+ # イメージ ダウンロード データ [root@dlp ~(keystone)]# openstack metric measures show c9671729-d54a-4a49-910f-f3188f86efa3 +---------------------------+-------------+--------------+ | timestamp | granularity | value | +---------------------------+-------------+--------------+ | 2019-05-17T15:50:00+09:00 | 300.0 | 1459617792.0 | +---------------------------+-------------+--------------+ # イメージ サイズ データ [root@dlp ~(keystone)]# openstack metric measures show 79f3aff5-6af4-469a-bcaf-d9fb86437265 +---------------------------+-------------+--------------+ | timestamp | granularity | value | +---------------------------+-------------+--------------+ | 2019-05-17T15:50:00+09:00 | 300.0 | 1459617792.0 | +---------------------------+-------------+--------------+ |
Sponsored Link |