OpenStack Rocky : Ceilometer 利用方法(Glance)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] | 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 openstack-glance-api openstack-glance-registry |
[2] | イメージを追加等した場合に収集されるデータの表示例です。 |
# リソース一覧 [root@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... +--------------------------------------+----------------------------+---------------------------------- # テストとしてイメージ登録 [root@dlp ~(keystone)]# openstack image create "CentOS75" --file centos75.qcow2 --disk-format qcow2 --container-format bare --public # テストとしてイメージダウンロード [root@dlp ~(keystone)]# openstack image save --file centos7.qcow2 CentOS75 # リソース一覧 [root@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... | e89a7a4a-8cad-4ecd-8535-183ef77b1500 | image | 2cb4b9d73bcc46449f711794506c3... +--------------------------------------+----------------------------+---------------------------------- # リソース詳細 [root@dlp ~(keystone)]# openstack metric resource show e89a7a4a-8cad-4ecd-8535-183ef77b1500 +-----------------------+-------------------------------------------------------------------+ | Field | Value | +-----------------------+-------------------------------------------------------------------+ | created_by_project_id | ece4ac6c7e764a979e36ba0b2faf848e | | created_by_user_id | cfc889992c144012a0092b270bfa0fbd | | creator | cfc889992c144012a0092b270bfa0fbd:ece4ac6c7e764a979e36ba0b2faf848e | | ended_at | None | | id | e89a7a4a-8cad-4ecd-8535-183ef77b1500 | | metrics | image.download: 117d25f0-319b-4ec0-982f-7b6490a7272b | | | image.serve: 9be14791-f7ad-4628-a2ca-1c080617bdd8 | | | image.size: 7da39de2-5693-4a99-8a50-ad3dfa105b98 | | original_resource_id | e89a7a4a-8cad-4ecd-8535-183ef77b1500 | | project_id | 2cb4b9d73bcc46449f711794506c3faf | | revision_end | None | | revision_start | 2018-09-06T05:54:22.435737+00:00 | | started_at | 2018-09-06T05:54:22.435693+00:00 | | type | image | | user_id | None | +-----------------------+-------------------------------------------------------------------+ # イメージ ダウンロード データ [root@dlp ~(keystone)]# openstack metric measures show 117d25f0-319b-4ec0-982f-7b6490a7272b +---------------------------+-------------+--------------+ | timestamp | granularity | value | +---------------------------+-------------+--------------+ | 2018-09-06T14:50:00+09:00 | 300.0 | 1421869056.0 | +---------------------------+-------------+--------------+ # イメージ サイズ データ [root@dlp ~(keystone)]# openstack metric measures show 7da39de2-5693-4a99-8a50-ad3dfa105b98 +---------------------------+-------------+--------------+ | timestamp | granularity | value | +---------------------------+-------------+--------------+ | 2018-09-06T14:50:00+09:00 | 300.0 | 1421869056.0 | +---------------------------+-------------+--------------+ |
Sponsored Link |
|