OpenStack Yoga : Ceilometer 利用方法 (Nova Compute)2022/04/12 |
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 | | Neutron Server | | Nova Compute | | Keystone Glance | | OVN-Northd | | Open vSwitch | | Nova API | | Cinder Volume | | OVN Metadata Agent | | Cinder API | | Heat API/Engine | | 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 | +--------------------------------------+-------------+---------+------------------------------------+------------+----------+ | 7ea894ee-3a91-4541-96ba-717ff45917c5 | Ubuntu-2004 | SHUTOFF | private=10.0.0.230, 192.168.100.12 | Ubuntu2004 | m1.small | +--------------------------------------+-------------+---------+------------------------------------+------------+----------+ubuntu@dlp ~(keystone)$ openstack server start Ubuntu-2004 # リソース一覧を表示 # インスタンス上での一定の操作後にデータが取得される ubuntu@dlp ~(keystone)$ openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | 7ea894ee-3a91-4541-96ba-717ff45917c5 | instance | d3434f55aa5541cfab5f13916da0697d | 250af39c-0514-5aab-b416-7f01b8b01e19 | instance_disk | d3434f55aa5541cfab5f13916da0697d | cb389274-fbb8-536a-9df0-a8d5d6bc8a2f | instance_network_interface | d3434f55aa5541cfab5f13916da0697d +--------------------------------------+----------------------------+---------------------------------- +----------------------------------+----------------------------------------------------------------------- | user_id | original_resource_id +----------------------------------+----------------------------------------------------------------------- | 95f196a1851c4b93b016871f7d5ded82 | 7ea894ee-3a91-4541-96ba-717ff45917c5 | 95f196a1851c4b93b016871f7d5ded82 | 7ea894ee-3a91-4541-96ba-717ff45917c5-vda | 95f196a1851c4b93b016871f7d5ded82 | instance-00000001-7ea894ee-3a91-4541-96ba-717ff45917c5-tapa64b94f9-0d +----------------------------------+----------------------------------------------------------------------- +----------------------------------+----------+----------------------------------+-------------- | started_at | ended_at | revision_start | revision_end +----------------------------------+----------+----------------------------------+-------------- | 2022-04-12T00:22:21.134406+00:00 | None | 2022-04-12T00:22:21.134415+00:00 | None | 2022-04-12T00:26:27.656086+00:00 | None | 2022-04-12T00:26:27.656092+00:00 | None | 2022-04-12T00:26:27.674702+00:00 | None | 2022-04-12T00:26:27.674711+00:00 | None +----------------------------------+----------+----------------------------------+-------------- +-------------------------------------------------------------------+ | creator | +-------------------------------------------------------------------+ | 4dde18e4717d4936ad5dea946de3d41f:c043fb355eff47e69642adfcd7a55620 | | 4dde18e4717d4936ad5dea946de3d41f:c043fb355eff47e69642adfcd7a55620 | | 4dde18e4717d4936ad5dea946de3d41f:c043fb355eff47e69642adfcd7a55620 | +-------------------------------------------------------------------+ # [instance] リソース詳細 ubuntu@dlp ~(keystone)$ openstack metric resource show 7ea894ee-3a91-4541-96ba-717ff45917c5 +-----------------------+-------------------------------------------------------------------+ | Field | Value | +-----------------------+-------------------------------------------------------------------+ | created_by_project_id | c043fb355eff47e69642adfcd7a55620 | | created_by_user_id | 4dde18e4717d4936ad5dea946de3d41f | | creator | 4dde18e4717d4936ad5dea946de3d41f:c043fb355eff47e69642adfcd7a55620 | | ended_at | None | | id | 7ea894ee-3a91-4541-96ba-717ff45917c5 | | metrics | cpu: b9f3ff28-1984-4c64-8008-5ea7b7ae8ad9 | | | disk.ephemeral.size: bedab3c8-5ea0-40f4-b488-cea3445761ad | | | disk.root.size: 9f38f535-18dc-402f-8efc-672b9ff1229d | | | memory.usage: 758e84bd-146b-4c8e-9178-9449e852554f | | | memory: 8e02f719-5cb6-476f-9c2b-7d40f2d90014 | | | vcpus: 6e92ddc7-7412-466f-a076-69ed39a174ea | | original_resource_id | 7ea894ee-3a91-4541-96ba-717ff45917c5 | | project_id | d3434f55aa5541cfab5f13916da0697d | | revision_end | None | | revision_start | 2022-04-12T00:22:21.134415+00:00 | | started_at | 2022-04-12T00:22:21.134406+00:00 | | type | instance | | user_id | 95f196a1851c4b93b016871f7d5ded82 | +-----------------------+-------------------------------------------------------------------+ # CPU ubuntu@dlp ~(keystone)$ openstack metric measures show b9f3ff28-1984-4c64-8008-5ea7b7ae8ad9 +---------------------------+-------------+---------------+ | timestamp | granularity | value | +---------------------------+-------------+---------------+ | 2022-04-12T09:25:00+09:00 | 300.0 | 78590000000.0 | +---------------------------+-------------+---------------+ # メモリー使用 ubuntu@dlp ~(keystone)$ openstack metric measures show 758e84bd-146b-4c8e-9178-9449e852554f +---------------------------+-------------+-------------+ | timestamp | granularity | value | +---------------------------+-------------+-------------+ | 2022-04-12T09:25:00+09:00 | 300.0 | 324.9765625 | +---------------------------+-------------+-------------+ # [instance_network_interface] リソース詳細 ubuntu@dlp ~(keystone)$ openstack metric resource show cb389274-fbb8-536a-9df0-a8d5d6bc8a2f +-----------------------+-----------------------------------------------------------------------+ | Field | Value | +-----------------------+-----------------------------------------------------------------------+ | created_by_project_id | c043fb355eff47e69642adfcd7a55620 | | created_by_user_id | 4dde18e4717d4936ad5dea946de3d41f | | creator | 4dde18e4717d4936ad5dea946de3d41f:c043fb355eff47e69642adfcd7a55620 | | ended_at | None | | id | cb389274-fbb8-536a-9df0-a8d5d6bc8a2f | | metrics | network.incoming.bytes: 6ebe95d7-d98e-49b2-93c5-229f14a22872 | | | network.incoming.packets: dd53b4e7-8c1b-4635-a84b-274873f327f5 | | | network.outgoing.bytes: 27cb77df-9c85-460c-b9e0-929de56c9333 | | | network.outgoing.packets: 9881e9b2-bf30-49ce-9cec-50857e61014d | | original_resource_id | instance-00000001-7ea894ee-3a91-4541-96ba-717ff45917c5-tapa64b94f9-0d | | project_id | d3434f55aa5541cfab5f13916da0697d | | revision_end | None | | revision_start | 2022-04-12T00:26:27.674711+00:00 | | started_at | 2022-04-12T00:26:27.674702+00:00 | | type | instance_network_interface | | user_id | 95f196a1851c4b93b016871f7d5ded82 | +-----------------------+-----------------------------------------------------------------------+ # ネットワーク インカミング バイト ubuntu@dlp ~(keystone)$ openstack metric measures show 6ebe95d7-d98e-49b2-93c5-229f14a22872 +---------------------------+-------------+------------+ | timestamp | granularity | value | +---------------------------+-------------+------------+ | 2022-04-12T09:25:00+09:00 | 300.0 | 42343775.0 | +---------------------------+-------------+------------+ # ネットワーク アウトゴーイング バイト ubuntu@dlp ~(keystone)$ openstack metric measures show 27cb77df-9c85-460c-b9e0-929de56c9333 +---------------------------+-------------+----------+ | timestamp | granularity | value | +---------------------------+-------------+----------+ | 2022-04-12T09:25:00+09:00 | 300.0 | 433816.0 | +---------------------------+-------------+----------+ |
Sponsored Link |