OpenStack Stein : Ceilometer 利用方法(Glance)2019/04/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] | 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 glance-api |
[2] | イメージを追加等した場合に収集されるデータの表示例です。 |
# リソース一覧 root@dlp ~(keystone)# openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | f8355134-f8eb-4779-840a-0c003eb57259 | instance | 82d4792327294948a047ed59e265b... | 933faac4-688a-55a5-8f62-927898cc9297 | instance_network_interface | ff03eefa265b423aa3375acb46a8e... | 26de0c76-9999-5e9b-b3e3-758a1af1b5e3 | instance_disk | ff03eefa265b423aa3375acb46a8e... | f92025e7-33b7-4a63-bc25-8b7d206773d9 | instance | ff03eefa265b423aa3375acb46a8e... +--------------------------------------+----------------------------+---------------------------------- # テストとしてイメージ登録 root@dlp ~(keystone)# openstack image create "Ubuntu180402" --file /var/kvm/images/ubuntu1804.img --disk-format qcow2 --container-format bare --public # テストとしてイメージダウンロード root@dlp ~(keystone)# openstack image save --file ubuntu1804.qcow2 Ubuntu180402 # リソース一覧 root@dlp ~(keystone)# openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | f8355134-f8eb-4779-840a-0c003eb57259 | instance | 82d4792327294948a047ed59e265b... | 933faac4-688a-55a5-8f62-927898cc9297 | instance_network_interface | ff03eefa265b423aa3375acb46a8e... | 26de0c76-9999-5e9b-b3e3-758a1af1b5e3 | instance_disk | ff03eefa265b423aa3375acb46a8e... | f92025e7-33b7-4a63-bc25-8b7d206773d9 | instance | ff03eefa265b423aa3375acb46a8e... | c04649fd-33d3-47ef-9aba-2ddf6a7925c9 | image | e52584cf60234bc090c7d437b8ca7... +--------------------------------------+----------------------------+---------------------------------- # image リソース詳細 root@dlp ~(keystone)# openstack metric resource show c04649fd-33d3-47ef-9aba-2ddf6a7925c9 +-----------------------+-------------------------------------------------------------------+ | Field | Value | +-----------------------+-------------------------------------------------------------------+ | created_by_project_id | efc5c6a05d444cae80c0a80f49ba87d4 | | created_by_user_id | ad726bcc13b9436d8fecb2336e9a5dae | | creator | ad726bcc13b9436d8fecb2336e9a5dae:efc5c6a05d444cae80c0a80f49ba87d4 | | ended_at | None | | id | c04649fd-33d3-47ef-9aba-2ddf6a7925c9 | | metrics | image.download: 2acb5964-e412-4e5e-96da-2e03967d3f8a | | | image.serve: 1eb271e9-d8b9-4ca7-858d-0c3758e9475b | | | image.size: af56b092-fd24-40b0-a9d1-2217590f440d | | original_resource_id | c04649fd-33d3-47ef-9aba-2ddf6a7925c9 | | project_id | e52584cf60234bc090c7d437b8ca7b62 | | revision_end | None | | revision_start | 2019-04-18T03:51:02.906291+00:00 | | started_at | 2019-04-18T03:51:02.906259+00:00 | | type | image | | user_id | None | +-----------------------+-------------------------------------------------------------------+ # イメージ ダウンロード データ root@dlp ~(keystone)# openstack metric measures show 2acb5964-e412-4e5e-96da-2e03967d3f8a +---------------------------+-------------+--------------+ | timestamp | granularity | value | +---------------------------+-------------+--------------+ | 2019-04-18T12:50:00+09:00 | 300.0 | 3131965440.0 | +---------------------------+-------------+--------------+ # イメージ サイズ データ root@dlp ~(keystone)# openstack metric measures show af56b092-fd24-40b0-a9d1-2217590f440d +---------------------------+-------------+--------------+ | timestamp | granularity | value | +---------------------------+-------------+--------------+ | 2019-04-18T12:50:00+09:00 | 300.0 | 3131965440.0 | +---------------------------+-------------+--------------+ |
Sponsored Link |
|