OpenStack Victoria : Ceilometer 利用方法 (Glance)2020/10/22 |
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 +--------------------------------------+----------------------------+---------------------------------- | 10abf4e3-d5d9-4b57-a5a0-7cb767442dcc | instance | 6c44eafd4f614985bf74b94f2aee8... | c96d50ae-df9a-58f4-acb8-d3fbfad117dd | instance_disk | 6c44eafd4f614985bf74b94f2aee8... | 103be51a-14ae-5fc4-8f0b-9b7458fc1bc1 | instance_network_interface | 6c44eafd4f614985bf74b94f2aee8... +--------------------------------------+----------------------------+---------------------------------- # テストとしてイメージ登録 root@dlp ~(keystone)# openstack image create "Ubuntu200402" --file /var/kvm/images/ubuntu2004.img --disk-format qcow2 --container-format bare --public # テストとしてイメージダウンロード root@dlp ~(keystone)# openstack image save --file ubuntu2004.qcow2 Ubuntu200402 # リソース一覧 root@dlp ~(keystone)# openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | 10abf4e3-d5d9-4b57-a5a0-7cb767442dcc | instance | 6c44eafd4f614985bf74b94f2aee8... | c96d50ae-df9a-58f4-acb8-d3fbfad117dd | instance_disk | 6c44eafd4f614985bf74b94f2aee8... | 103be51a-14ae-5fc4-8f0b-9b7458fc1bc1 | instance_network_interface | 6c44eafd4f614985bf74b94f2aee8... | 83f33ef1-c089-4324-b0f5-17ce87855a38 | image | b573c9e160864f028fc2d681a929f... +--------------------------------------+----------------------------+---------------------------------- # [image] リソース詳細 root@dlp ~(keystone)# openstack metric resource show 83f33ef1-c089-4324-b0f5-17ce87855a38 +-----------------------+-------------------------------------------------------------------+ | Field | Value | +-----------------------+-------------------------------------------------------------------+ | created_by_project_id | 37197271a1954ddb90207a95d5f46488 | | created_by_user_id | a954b69f9b8345d9a797abbc0a949108 | | creator | a954b69f9b8345d9a797abbc0a949108:37197271a1954ddb90207a95d5f46488 | | ended_at | None | | id | 83f33ef1-c089-4324-b0f5-17ce87855a38 | | metrics | image.download: 635ec339-dfc6-45ba-aa33-7676915f5a23 | | | image.serve: 41ff51d7-a0b6-40c5-89aa-65182dc1a516 | | | image.size: 38df0c71-24c3-4b8c-ad29-c0075af950e5 | | original_resource_id | 83f33ef1-c089-4324-b0f5-17ce87855a38 | | project_id | b573c9e160864f028fc2d681a929f5af | | revision_end | None | | revision_start | 2020-10-22T01:33:47.381709+00:00 | | started_at | 2020-10-22T01:33:47.381703+00:00 | | type | image | | user_id | None | +-----------------------+-------------------------------------------------------------------+ # イメージ ダウンロード データ root@dlp ~(keystone)# openstack metric measures show 635ec339-dfc6-45ba-aa33-7676915f5a23 +---------------------------+-------------+--------------+ | timestamp | granularity | value | +---------------------------+-------------+--------------+ | 2020-10-22T10:30:00+09:00 | 300.0 | 2834497536.0 | +---------------------------+-------------+--------------+ # イメージ サイズ データ root@dlp ~(keystone)# openstack metric measures show 38df0c71-24c3-4b8c-ad29-c0075af950e5 +---------------------------+-------------+--------------+ | timestamp | granularity | value | +---------------------------+-------------+--------------+ | 2020-10-22T10:30:00+09:00 | 300.0 | 2834497536.0 | +---------------------------+-------------+--------------+ |
Sponsored Link |