OpenStack Yoga : Ceilometer 利用方法 (Nova Compute)2022/06/13 |
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 httpd | | Neutron Server | | Nova Compute | | Keystone Glance | | OVN-Northd | | Open vSwitch | | Nova API Cinder API | | Cinder Volume | | OVN Metadata Agent | | | | Gnocchi httpd | | OVN-Controller | | | | Ceilometer Central | | Ceilometer Compute | +-----------------------+ +-----------------------+ +-----------------------+ |
[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 openstack-nova-compute |
[2] | 任意のユーザーでインスタンスを起動した場合に収集されるデータの表示例です。 |
# インスタンス起動 [cent@dlp ~(keystone)]$ openstack server list +--------------------------------------+------------+---------+-------------------------------------+----------------+----------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+------------+---------+-------------------------------------+----------------+----------+ | 25ef320e-b16e-4085-96ef-af7fa0d33cfb | CentOS-St9 | SHUTOFF | private=10.0.0.242, 192.168.100.214 | CentOS-Stream9 | m1.small | +--------------------------------------+------------+---------+-------------------------------------+----------------+----------+
[cent@dlp ~(keystone)]$
openstack server start CentOS-St9
# リソース一覧を表示 # インスタンスで一定の操作をしたのちにデータが取得される [cent@dlp ~(keystone)]$ openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | 25ef320e-b16e-4085-96ef-af7fa0d33cfb | instance | 911e5ff7686741c782d6acc6d7155db1 | f7e5361a-fd6c-568a-a718-0168c5ae2c65 | instance_network_interface | 911e5ff7686741c782d6acc6d7155db1 | 4f70f768-ed81-58c8-be82-704e89dfc79d | instance_disk | 911e5ff7686741c782d6acc6d7155db1 +--------------------------------------+----------------------------+---------------------------------- +----------------------------------+----------------------------------------------------------------------- | user_id | original_resource_id +----------------------------------+----------------------------------------------------------------------- | 1ff4591a7f8140fcad38fd9f606a66a6 | 25ef320e-b16e-4085-96ef-af7fa0d33cfb | 1ff4591a7f8140fcad38fd9f606a66a6 | instance-00000001-25ef320e-b16e-4085-96ef-af7fa0d33cfb-tap323ddce5-ae | 1ff4591a7f8140fcad38fd9f606a66a6 | 25ef320e-b16e-4085-96ef-af7fa0d33cfb-vda +----------------------------------+----------------------------------------------------------------------- +----------------------------------+----------+----------------------------------+-------------- | started_at | ended_at | revision_start | revision_end +----------------------------------+----------+----------------------------------+-------------- | 2022-06-13T06:00:03.539975+00:00 | None | 2022-06-13T06:00:03.539983+00:00 | None | 2022-06-13T06:01:00.129895+00:00 | None | 2022-06-13T06:01:00.129902+00:00 | None | 2022-06-13T06:01:00.134739+00:00 | None | 2022-06-13T06:01:00.134746+00:00 | None +----------------------------------+----------+----------------------------------+-------------- +-------------------------------------------------------------------+ | creator | +-------------------------------------------------------------------+ | efeba9b14c234edbb78d0cbad397e6ed:0f2625947bf0433a9519ba8a29434bdf | | efeba9b14c234edbb78d0cbad397e6ed:0f2625947bf0433a9519ba8a29434bdf | | efeba9b14c234edbb78d0cbad397e6ed:0f2625947bf0433a9519ba8a29434bdf | +-------------------------------------------------------------------+ # [instance] リソース詳細 [cent@dlp ~(keystone)]$ openstack metric resource show 25ef320e-b16e-4085-96ef-af7fa0d33cfb +-----------------------+-------------------------------------------------------------------+ | Field | Value | +-----------------------+-------------------------------------------------------------------+ | created_by_project_id | 0f2625947bf0433a9519ba8a29434bdf | | created_by_user_id | efeba9b14c234edbb78d0cbad397e6ed | | creator | efeba9b14c234edbb78d0cbad397e6ed:0f2625947bf0433a9519ba8a29434bdf | | ended_at | None | | id | 25ef320e-b16e-4085-96ef-af7fa0d33cfb | | metrics | cpu: bb708009-8f63-4b67-8c7d-f55469a5c77e | | | disk.ephemeral.size: a13e1ac6-6542-47cc-a10c-96d0ef2d6511 | | | disk.root.size: 02a3e2a2-9253-417b-9db0-93d209fab14e | | | memory.usage: 5b6d2405-ef89-47da-842c-e05f38451fde | | | memory: 487137f4-5dd6-437c-8530-e8cffd6b699a | | | vcpus: db1e9f4e-0f28-4db9-ae35-2d04e46f022f | | original_resource_id | 25ef320e-b16e-4085-96ef-af7fa0d33cfb | | project_id | 911e5ff7686741c782d6acc6d7155db1 | | revision_end | None | | revision_start | 2022-06-13T06:00:03.539983+00:00 | | started_at | 2022-06-13T06:00:03.539975+00:00 | | type | instance | | user_id | 1ff4591a7f8140fcad38fd9f606a66a6 | +-----------------------+-------------------------------------------------------------------+ # CPU [cent@dlp ~(keystone)]$ openstack metric measures show bb708009-8f63-4b67-8c7d-f55469a5c77e +---------------------------+-------------+----------------+ | timestamp | granularity | value | +---------------------------+-------------+----------------+ | 2022-06-13T15:00:00+09:00 | 300.0 | 28350000000.0 | | 2022-06-13T15:05:00+09:00 | 300.0 | 212900000000.0 | +---------------------------+-------------+----------------+ # メモリー使用 [cent@dlp ~(keystone)]$ openstack metric measures show 5b6d2405-ef89-47da-842c-e05f38451fde +---------------------------+-------------+-------------+ | timestamp | granularity | value | +---------------------------+-------------+-------------+ | 2022-06-13T15:00:00+09:00 | 300.0 | 295.0234375 | | 2022-06-13T15:05:00+09:00 | 300.0 | 342.8515625 | +---------------------------+-------------+-------------+ # [instance_network_interface] リソース詳細 [cent@dlp ~(keystone)]$ openstack metric resource show f7e5361a-fd6c-568a-a718-0168c5ae2c65 +-----------------------+-----------------------------------------------------------------------+ | Field | Value | +-----------------------+-----------------------------------------------------------------------+ | created_by_project_id | 0f2625947bf0433a9519ba8a29434bdf | | created_by_user_id | efeba9b14c234edbb78d0cbad397e6ed | | creator | efeba9b14c234edbb78d0cbad397e6ed:0f2625947bf0433a9519ba8a29434bdf | | ended_at | None | | id | f7e5361a-fd6c-568a-a718-0168c5ae2c65 | | metrics | network.incoming.bytes: a9000ff7-ea8e-49c7-a874-38b93d2ab141 | | | network.incoming.packets: 2285ec64-e2e3-4958-a124-f13cbe0e7a81 | | | network.outgoing.bytes: 4454fc2d-69b1-4da4-a58f-d4e29aa8d9e8 | | | network.outgoing.packets: 4df12f90-27b7-4b6c-b0cf-fc3400b79e3f | | original_resource_id | instance-00000001-25ef320e-b16e-4085-96ef-af7fa0d33cfb-tap323ddce5-ae | | project_id | 911e5ff7686741c782d6acc6d7155db1 | | revision_end | None | | revision_start | 2022-06-13T06:01:00.129902+00:00 | | started_at | 2022-06-13T06:01:00.129895+00:00 | | type | instance_network_interface | | user_id | 1ff4591a7f8140fcad38fd9f606a66a6 | +-----------------------+-----------------------------------------------------------------------+ # ネットワーク インカミング バイト [cent@dlp ~(keystone)]$ openstack metric measures show a9000ff7-ea8e-49c7-a874-38b93d2ab141 +---------------------------+-------------+----------+ | timestamp | granularity | value | +---------------------------+-------------+----------+ | 2022-06-13T15:00:00+09:00 | 300.0 | 14533.0 | | 2022-06-13T15:05:00+09:00 | 300.0 | 868839.0 | +---------------------------+-------------+----------+ # ネットワーク アウトゴーイング バイト [cent@dlp ~(keystone)]$ openstack metric measures show 4454fc2d-69b1-4da4-a58f-d4e29aa8d9e8 +---------------------------+-------------+------------+ | timestamp | granularity | value | +---------------------------+-------------+------------+ | 2022-06-13T15:00:00+09:00 | 300.0 | 26738.0 | | 2022-06-13T15:05:00+09:00 | 300.0 | 89897276.0 | +---------------------------+-------------+------------+ |
Sponsored Link |