OpenStack Bobcat : Ceilometer 利用方法 (Nova Compute)2023/10/10 |
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] | Compute サービスの各種データ収集を有効にするには、Compute ノードの Nova Compute を以下のように設定します。 |
root@node01:~#
vi /etc/nova/nova.conf # [DEFAULT] セクション内の任意の場所へ追記 instance_usage_audit = True instance_usage_audit_period = hour # 最終行へ追記 [notifications] notify_on_state_change = vm_and_task_state [oslo_messaging_notifications] driver = messagingv2 systemctl restart nova-compute |
[2] | 任意のユーザーでインスタンスを作成/起動した場合に収集されるデータの表示例です。 |
# インスタンス起動 ubuntu@dlp ~(keystone)$ openstack server list +--------------------------------------+-------------+---------+------------------------------------+------------+-----------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+-------------+---------+------------------------------------+------------+-----------+ | 530698ed-413e-4bda-b02e-8f6f60380bd1 | Ubuntu-2204 | SHUTOFF | private=10.0.0.222, 192.168.100.79 | Ubuntu2204 | m1.medium | +--------------------------------------+-------------+---------+------------------------------------+------------+-----------+ubuntu@dlp ~(keystone)$ openstack server start Ubuntu-2204 # リソース一覧を表示 # インスタンス上での一定の操作後にデータが取得される ubuntu@dlp ~(keystone)$ openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | 530698ed-413e-4bda-b02e-8f6f60380bd1 | instance | f30cd546632e484cb24414d83207694b | 08fd4272-e83e-5e79-8a9a-05905598f8a5 | instance_network_interface | f30cd546632e484cb24414d83207694b | 6b32c72e-9cef-54f0-9a38-dc657e110413 | instance_disk | f30cd546632e484cb24414d83207694b +--------------------------------------+----------------------------+---------------------------------- +----------------------------------+----------------------------------------------------------------------- | user_id | original_resource_id +----------------------------------+----------------------------------------------------------------------- | 470c9323dad64bbea8fb5ecca6381f72 | 530698ed-413e-4bda-b02e-8f6f60380bd1 | 470c9323dad64bbea8fb5ecca6381f72 | instance-00000001-530698ed-413e-4bda-b02e-8f6f60380bd1-tapbfc2108d-94 | 470c9323dad64bbea8fb5ecca6381f72 | 530698ed-413e-4bda-b02e-8f6f60380bd1-vda +----------------------------------+----------------------------------------------------------------------- +----------------------------------+----------+---------------------------------- | started_at | ended_at | revision_start +----------------------------------+----------+---------------------------------- | 2023-10-10T00:07:31.776539+00:00 | None | 2023-10-10T00:07:31.776545+00:00 | 2023-10-10T00:11:48.469911+00:00 | None | 2023-10-10T00:11:48.469917+00:00 | 2023-10-10T00:11:48.776676+00:00 | None | 2023-10-10T00:11:48.776682+00:00 +----------------------------------+----------+---------------------------------- +--------------+-------------------------------------------------------------------+ | revision_end | creator | +--------------+-------------------------------------------------------------------+ | None | 1a0486c8d8664739b082ae0c97fa0cc3:04b6d7802d9043cbb09ceb31fd68987b | | None | 1a0486c8d8664739b082ae0c97fa0cc3:04b6d7802d9043cbb09ceb31fd68987b | | None | 1a0486c8d8664739b082ae0c97fa0cc3:04b6d7802d9043cbb09ceb31fd68987b | +--------------+-------------------------------------------------------------------+ # [instance] リソース詳細 ubuntu@dlp ~(keystone)$ openstack metric resource show 530698ed-413e-4bda-b02e-8f6f60380bd1 +-----------------------+-------------------------------------------------------------------+ | Field | Value | +-----------------------+-------------------------------------------------------------------+ | created_by_project_id | 04b6d7802d9043cbb09ceb31fd68987b | | created_by_user_id | 1a0486c8d8664739b082ae0c97fa0cc3 | | creator | 1a0486c8d8664739b082ae0c97fa0cc3:04b6d7802d9043cbb09ceb31fd68987b | | ended_at | None | | id | 530698ed-413e-4bda-b02e-8f6f60380bd1 | | metrics | cpu: e99cc743-77e4-4bf8-84c1-9e4851ca6e49 | | | disk.ephemeral.size: f740924f-2dd0-415a-8a5e-643986e91614 | | | disk.root.size: 33dec344-3f58-4941-b865-4c523b6ada71 | | | memory.usage: 1bc5a709-4caa-42fa-a29b-5ca52506c48c | | | memory: e1c3de14-a0ee-4ce2-a488-5a00c089e52d | | | vcpus: 8ef58da4-a537-4fd2-979c-2f68fd654d55 | | original_resource_id | 530698ed-413e-4bda-b02e-8f6f60380bd1 | | project_id | f30cd546632e484cb24414d83207694b | | revision_end | None | | revision_start | 2023-10-10T00:07:31.776545+00:00 | | started_at | 2023-10-10T00:07:31.776539+00:00 | | type | instance | | user_id | 470c9323dad64bbea8fb5ecca6381f72 | +-----------------------+-------------------------------------------------------------------+ # CPU ubuntu@dlp ~(keystone)$ openstack metric measures show e99cc743-77e4-4bf8-84c1-9e4851ca6e49 +---------------------------+-------------+----------------+ | timestamp | granularity | value | +---------------------------+-------------+----------------+ | 2023-10-10T09:10:00+09:00 | 300.0 | 203350000000.0 | | 2023-10-10T09:15:00+09:00 | 300.0 | 495410000000.0 | +---------------------------+-------------+----------------+ # メモリー使用 ubuntu@dlp ~(keystone)$ openstack metric measures show 1bc5a709-4caa-42fa-a29b-5ca52506c48c +---------------------------+-------------+--------------+ | timestamp | granularity | value | +---------------------------+-------------+--------------+ | 2023-10-10T09:10:00+09:00 | 300.0 | 423.73046875 | | 2023-10-10T09:15:00+09:00 | 300.0 | 422.35546875 | +---------------------------+-------------+--------------+ # [instance_network_interface] リソース詳細 ubuntu@dlp ~(keystone)$ openstack metric resource show 08fd4272-e83e-5e79-8a9a-05905598f8a5 +-----------------------+-----------------------------------------------------------------------+ | Field | Value | +-----------------------+-----------------------------------------------------------------------+ | created_by_project_id | 04b6d7802d9043cbb09ceb31fd68987b | | created_by_user_id | 1a0486c8d8664739b082ae0c97fa0cc3 | | creator | 1a0486c8d8664739b082ae0c97fa0cc3:04b6d7802d9043cbb09ceb31fd68987b | | ended_at | None | | id | 08fd4272-e83e-5e79-8a9a-05905598f8a5 | | metrics | network.incoming.bytes: 740afe31-8656-4181-b71e-3f468244cfa3 | | | network.incoming.packets: bf413675-9121-4258-bc82-e61db208ccbc | | | network.outgoing.bytes: 1660c109-2807-4c5d-97f7-5b5f4f08bcd3 | | | network.outgoing.packets: f2dcf0c3-bd2e-4e7c-b33e-88048970f282 | | original_resource_id | instance-00000001-530698ed-413e-4bda-b02e-8f6f60380bd1-tapbfc2108d-94 | | project_id | f30cd546632e484cb24414d83207694b | | revision_end | None | | revision_start | 2023-10-10T00:11:48.469917+00:00 | | started_at | 2023-10-10T00:11:48.469911+00:00 | | type | instance_network_interface | | user_id | 470c9323dad64bbea8fb5ecca6381f72 | +-----------------------+-----------------------------------------------------------------------+ # ネットワーク インカミング バイト ubuntu@dlp ~(keystone)$ openstack metric measures show 740afe31-8656-4181-b71e-3f468244cfa3 +---------------------------+-------------+----------+ | timestamp | granularity | value | +---------------------------+-------------+----------+ | 2023-10-10T09:10:00+09:00 | 300.0 | 752245.0 | | 2023-10-10T09:15:00+09:00 | 300.0 | 753869.0 | +---------------------------+-------------+----------+ # ネットワーク アウトゴーイング バイト ubuntu@dlp ~(keystone)$ openstack metric measures show 1660c109-2807-4c5d-97f7-5b5f4f08bcd3 +---------------------------+-------------+------------+ | timestamp | granularity | value | +---------------------------+-------------+------------+ | 2023-10-10T09:10:00+09:00 | 300.0 | 50797744.0 | | 2023-10-10T09:15:00+09:00 | 300.0 | 50799680.0 | +---------------------------+-------------+------------+ |
Sponsored Link |