OpenStack Zed : Ceilometer 利用方法 (Glance)2022/11/11 |
OpenStack Telemetry Service (Ceilometer) の利用方法です。
当例では以下のような環境を例に Ceilometer サービスをインストールしています。
------------+-----------------------------+-----------------------------+------------ | | | eth0|10.0.0.30 eth0|10.0.0.50 eth0|10.0.0.51 +-----------+-----------+ +-----------+-----------+ +-----------+-----------+ | [ dlp.srv.world ] | | [ network.srv.world ] | | [ node01.srv.world ] | | (Control Node) | | (Network Node) | | (Compute Node) | | | | | | | | MariaDB RabbitMQ | | Open vSwitch | | Libvirt | | Memcached Nginx | | Neutron Server | | Nova Compute | | Keystone httpd | | OVN-Northd | | Open vSwitch | | Glance Nova API | | Nginx iSCSI Target | | OVN Metadata Agent | | Cinder API | | Cinder Volume | | OVN-Controller | | | | Gnocchi httpd | | Ceilometer Compute | | | | 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@dlp.srv.world systemctl restart openstack-glance-api |
[2] | イメージを追加等した場合に収集されるデータの表示例です。 |
# リソース一覧 [root@dlp ~(keystone)]# openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | 158685ed-8159-4aad-a294-3227b427f7e1 | instance | 28b6e37c787240e4a975d3614821c... | 18ab0b6e-fe5c-5578-90ec-2a646869eab1 | instance_network_interface | 28b6e37c787240e4a975d3614821c... | 256bfff5-a44e-5dc8-961e-553754909551 | instance_disk | 28b6e37c787240e4a975d3614821c... +--------------------------------------+----------------------------+----------------------------------[root@dlp ~(keystone)]# openstack image list +--------------------------------------+----------------+--------+ | ID | Name | Status | +--------------------------------------+----------------+--------+ | 8367cc21-61f4-480b-8d03-90c057c7a7cf | CentOS-Stream9 | active | +--------------------------------------+----------------+--------+ # テストとしてイメージダウンロード [root@dlp ~(keystone)]# openstack image save --file centos-st9.qcow2 CentOS-Stream9 # テストとしてイメージ登録 [root@dlp ~(keystone)]# openstack image create "CentOS-ST9" --file centos-st9.qcow2 --disk-format qcow2 --container-format bare --public # リソース一覧 [root@dlp ~(keystone)]# openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | 158685ed-8159-4aad-a294-3227b427f7e1 | instance | 28b6e37c787240e4a975d3614821c... | 18ab0b6e-fe5c-5578-90ec-2a646869eab1 | instance_network_interface | 28b6e37c787240e4a975d3614821c... | 256bfff5-a44e-5dc8-961e-553754909551 | instance_disk | 28b6e37c787240e4a975d3614821c... | 73db6904-b74f-4013-82ba-7928164c26ba | image | 939974d6fc8e400eb01f7dd749935... +--------------------------------------+----------------------------+---------------------------------- # [image] リソース詳細 [root@dlp ~(keystone)]# openstack metric resource show 73db6904-b74f-4013-82ba-7928164c26ba +-----------------------+-------------------------------------------------------------------+ | Field | Value | +-----------------------+-------------------------------------------------------------------+ | created_by_project_id | 62f531f4d2934e75b8d7f11cd7d53be3 | | created_by_user_id | 3567bb8bb7594c2189124b7aca36e6d3 | | creator | 3567bb8bb7594c2189124b7aca36e6d3:62f531f4d2934e75b8d7f11cd7d53be3 | | ended_at | None | | id | 73db6904-b74f-4013-82ba-7928164c26ba | | metrics | image.size: e9adb0fe-dcf8-4c1d-82b5-c3c9920289a6 | | original_resource_id | 73db6904-b74f-4013-82ba-7928164c26ba | | project_id | 939974d6fc8e400eb01f7dd749935ea3 | | revision_end | None | | revision_start | 2022-11-11T08:02:42.953218+00:00 | | started_at | 2022-11-11T08:02:42.953213+00:00 | | type | image | | user_id | None | +-----------------------+-------------------------------------------------------------------+ # イメージ サイズ データ [root@dlp ~(keystone)]# openstack metric measures show e9adb0fe-dcf8-4c1d-82b5-c3c9920289a6 +---------------------------+-------------+--------------+ | timestamp | granularity | value | +---------------------------+-------------+--------------+ | 2022-11-11T17:00:00+09:00 | 300.0 | 2228682752.0 | +---------------------------+-------------+--------------+ |
Sponsored Link |
|