OpenStack Rocky : Ceilometer 利用方法(Glance)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] | 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
root@dlp ~(keystone)#
vi /etc/glance/glance-registry.conf # 最終行へ追記 [oslo_messaging_notifications] driver = messagingv2 # RabbitMQ 接続情報 transport_url = rabbit://openstack:password@10.0.0.30 systemctl restart glance-api glance-registry |
[2] | イメージを追加等した場合に収集されるデータの表示例です。 |
# リソース一覧 root@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... +--------------------------------------+----------------------------+---------------------------------- # テストとしてイメージ登録 root@dlp ~(keystone)# openstack image create "Ubuntu180401" --file /var/kvm/images/ubuntu1804.img --disk-format qcow2 --container-format bare --public # テストとしてイメージダウンロード root@dlp ~(keystone)# openstack image save --file ubuntu1804.qcow2 Ubuntu180401 # リソース一覧 root@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... | 334811ef-c11b-4f8b-8b76-470fc58f4a06 | image | a4307ece2969492eb795f64da4006... +--------------------------------------+----------------------------+---------------------------------- # image リソース詳細 root@dlp ~(keystone)# openstack metric resource show 334811ef-c11b-4f8b-8b76-470fc58f4a06 +-----------------------+-------------------------------------------------------------------+ | Field | Value | +-----------------------+-------------------------------------------------------------------+ | created_by_project_id | aaeee626080841a491235fb06e77f10c | | created_by_user_id | 1473e02cb8754787a0a9e47dd7d8e0ce | | creator | 1473e02cb8754787a0a9e47dd7d8e0ce:aaeee626080841a491235fb06e77f10c | | ended_at | None | | id | 334811ef-c11b-4f8b-8b76-470fc58f4a06 | | metrics | image.download: b5e4e666-c81f-4620-831d-0d67e7497d3a | | | image.serve: d7232eaf-485b-481a-b9c5-09cdb9687924 | | | image.size: 6d8944af-8a8c-4e62-8195-359bc9bfeb0a | | original_resource_id | 334811ef-c11b-4f8b-8b76-470fc58f4a06 | | project_id | a4307ece2969492eb795f64da4006b2d | | revision_end | None | | revision_start | 2018-09-18T08:00:08.377328+00:00 | | started_at | 2018-09-18T08:00:08.377307+00:00 | | type | image | | user_id | None | +-----------------------+-------------------------------------------------------------------+ # イメージ ダウンロード データ root@dlp ~(keystone)# openstack metric measures show b5e4e666-c81f-4620-831d-0d67e7497d3a +---------------------------+-------------+--------------+ | timestamp | granularity | value | +---------------------------+-------------+--------------+ | 2018-09-18T17:00:00+09:00 | 300.0 | 2945646592.0 | +---------------------------+-------------+--------------+ # イメージ サイズ データ root@dlp ~(keystone)# openstack metric measures show 6d8944af-8a8c-4e62-8195-359bc9bfeb0a +---------------------------+-------------+--------------+ | timestamp | granularity | value | +---------------------------+-------------+--------------+ | 2018-09-18T17:00:00+09:00 | 300.0 | 2945646592.0 | +---------------------------+-------------+--------------+ |
Sponsored Link |
|