OpenStack Xena : Ceilometer 利用方法 (Glance)2021/11/25 |
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 | | Open vSwitch | | Libvirt | | Memcached httpd | | Neutron Server | | Nova Compute | | Keystone Glance | | OVN-Northd | | Open vSwitch | | Nova API | | Cinder Volume | | OVN Metadata Agent | | Cinder API | | iSCSI Target | | OVN-Controller | | | | Heat API/Engine | | Ceilometer Compute | | | | 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 openstack-glance-api |
[2] | イメージを追加等した場合に収集されるデータの表示例です。 |
# リソース一覧 [root@dlp ~(keystone)]# openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | a6180855-77cf-476f-9f26-4fc79baa38c2 | instance | 2decda8bcd724687a1cf05064ab21... | 5624383f-677b-598e-a43b-4eb1a1cb5afd | instance_disk | 2decda8bcd724687a1cf05064ab21... | d83f7af1-8e5c-52a0-b151-0a0ee0978e9a | instance_network_interface | 2decda8bcd724687a1cf05064ab21... +--------------------------------------+----------------------------+----------------------------------[root@dlp ~(keystone)]# openstack image list +--------------------------------------+-----------------+--------+ | ID | Name | Status | +--------------------------------------+-----------------+--------+ | cfce605e-151b-43dd-b743-2c7988d69e96 | CentOS-Stream-8 | active | +--------------------------------------+-----------------+--------+ # テストとしてイメージダウンロード [root@dlp ~(keystone)]# openstack image save --file centos-st8.qcow2 CentOS-Stream-8 # テストとしてイメージ登録 [root@dlp ~(keystone)]# openstack image create "CentOS-ST8" --file centos-st8.qcow2 --disk-format qcow2 --container-format bare --public # リソース一覧 [root@dlp ~(keystone)]# openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | a6180855-77cf-476f-9f26-4fc79baa38c2 | instance | 2decda8bcd724687a1cf05064ab21... | 5624383f-677b-598e-a43b-4eb1a1cb5afd | instance_disk | 2decda8bcd724687a1cf05064ab21... | d83f7af1-8e5c-52a0-b151-0a0ee0978e9a | instance_network_interface | 2decda8bcd724687a1cf05064ab21... | a8685e47-742b-45cd-89c5-d7c2c7f82f6e | image | b12f95625664420ca31949963b75b... +--------------------------------------+----------------------------+---------------------------------- # [image] リソース詳細 [root@dlp ~(keystone)]# openstack metric resource show a8685e47-742b-45cd-89c5-d7c2c7f82f6e +-----------------------+-------------------------------------------------------------------+ | Field | Value | +-----------------------+-------------------------------------------------------------------+ | created_by_project_id | 7e53ef14eb894f379ea1929f5defc949 | | created_by_user_id | 1bbca96b926645e18c83df974aafc98f | | creator | 1bbca96b926645e18c83df974aafc98f:7e53ef14eb894f379ea1929f5defc949 | | ended_at | None | | id | a8685e47-742b-45cd-89c5-d7c2c7f82f6e | | metrics | image.size: 936fca06-3011-42c2-8532-11e5d932d10b | | original_resource_id | a8685e47-742b-45cd-89c5-d7c2c7f82f6e | | project_id | b12f95625664420ca31949963b75b74f | | revision_end | None | | revision_start | 2021-11-25T06:20:54.977999+00:00 | | started_at | 2021-11-25T06:20:54.977991+00:00 | | type | image | | user_id | None | +-----------------------+-------------------------------------------------------------------+ # イメージ サイズ データ [root@dlp ~(keystone)]# openstack metric measures show 936fca06-3011-42c2-8532-11e5d932d10b +---------------------------+-------------+--------------+ | timestamp | granularity | value | +---------------------------+-------------+--------------+ | 2021-11-25T15:20:00+09:00 | 300.0 | 2574581760.0 | +---------------------------+-------------+--------------+ |
Sponsored Link |