OpenStack Xena : Ceilometer 利用方法 (Nova Compute)2021/10/11 |
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 | +--------------------------------------+-------------+---------+-------------------------------------+------------+----------+ | 4699d575-1d94-4024-8323-9dfa3599c8d2 | Ubuntu-2004 | SHUTOFF | private=10.0.0.249, 192.168.100.237 | Ubuntu2004 | m1.small | +--------------------------------------+-------------+---------+-------------------------------------+------------+----------+ubuntu@dlp ~(keystone)$ openstack server start Ubuntu-2004 # リソース一覧を表示 # インスタンス上での一定の操作後にデータが取得される ubuntu@dlp ~(keystone)$ openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | 4699d575-1d94-4024-8323-9dfa3599c8d2 | instance | facc545a7f9e4218884c40169158a2dc | 75d568e7-b47a-54a2-911e-5c189f4c75c8 | instance_disk | facc545a7f9e4218884c40169158a2dc | 2d65a40a-ec43-58ad-bfd9-c5b4df1059ae | instance_network_interface | facc545a7f9e4218884c40169158a2dc +--------------------------------------+----------------------------+---------------------------------- +----------------------------------+----------------------------------------------------------------------- | user_id | original_resource_id +----------------------------------+----------------------------------------------------------------------- | f5a7ffdd6e54434badbd75ba0e6d6ac2 | 4699d575-1d94-4024-8323-9dfa3599c8d2 | f5a7ffdd6e54434badbd75ba0e6d6ac2 | 4699d575-1d94-4024-8323-9dfa3599c8d2-vda | f5a7ffdd6e54434badbd75ba0e6d6ac2 | instance-00000001-4699d575-1d94-4024-8323-9dfa3599c8d2-tap6009a23e-bc +----------------------------------+----------------------------------------------------------------------- +----------------------------------+----------+----------------------------------+-------------- | started_at | ended_at | revision_start | revision_end +----------------------------------+----------+----------------------------------+-------------- | 2021-10-11T05:07:33.252971+00:00 | None | 2021-10-11T05:07:33.252981+00:00 | None | 2021-10-11T05:11:29.849202+00:00 | None | 2021-10-11T05:11:29.849211+00:00 | None | 2021-10-11T05:11:29.939003+00:00 | None | 2021-10-11T05:11:29.939010+00:00 | None +----------------------------------+----------+----------------------------------+-------------- +-------------------------------------------------------------------+ | creator | +-------------------------------------------------------------------+ | 6f2ebeebee50478588d34251b7770183:611e3ba8938b475fb9dd8124603f18d3 | | 6f2ebeebee50478588d34251b7770183:611e3ba8938b475fb9dd8124603f18d3 | | 6f2ebeebee50478588d34251b7770183:611e3ba8938b475fb9dd8124603f18d3 | +-------------------------------------------------------------------+ # [instance] リソース詳細 ubuntu@dlp ~(keystone)$ openstack metric resource show 4699d575-1d94-4024-8323-9dfa3599c8d2 +-----------------------+-------------------------------------------------------------------+ | Field | Value | +-----------------------+-------------------------------------------------------------------+ | created_by_project_id | 611e3ba8938b475fb9dd8124603f18d3 | | created_by_user_id | 6f2ebeebee50478588d34251b7770183 | | creator | 6f2ebeebee50478588d34251b7770183:611e3ba8938b475fb9dd8124603f18d3 | | ended_at | None | | id | 4699d575-1d94-4024-8323-9dfa3599c8d2 | | metrics | cpu: 55c64dd6-4785-4473-8f3f-62361f0899e7 | | | disk.ephemeral.size: 1d69ec72-1a3c-4b26-938c-0cbca5c72849 | | | disk.root.size: d1ba8f75-1e66-415e-a936-750e7164c107 | | | memory.usage: 0c5bf3fd-8a18-4255-b216-91193149dc7f | | | memory: c0244f89-0c38-46bf-be85-0188a0f903a2 | | | vcpus: a2c39716-a3ce-423e-a16e-34c34a5c3867 | | original_resource_id | 4699d575-1d94-4024-8323-9dfa3599c8d2 | | project_id | facc545a7f9e4218884c40169158a2dc | | revision_end | None | | revision_start | 2021-10-11T05:07:33.252981+00:00 | | started_at | 2021-10-11T05:07:33.252971+00:00 | | type | instance | | user_id | f5a7ffdd6e54434badbd75ba0e6d6ac2 | +-----------------------+-------------------------------------------------------------------+ # CPU ubuntu@dlp ~(keystone)$ openstack metric measures show 55c64dd6-4785-4473-8f3f-62361f0899e7 +---------------------------+-------------+---------------+ | timestamp | granularity | value | +---------------------------+-------------+---------------+ | 2021-10-11T14:10:00+09:00 | 300.0 | 680000000.0 | | 2021-10-11T14:20:00+09:00 | 300.0 | 96200000000.0 | +---------------------------+-------------+---------------+ # メモリー使用 ubuntu@dlp ~(keystone)$ openstack metric measures show 0c5bf3fd-8a18-4255-b216-91193149dc7f +---------------------------+-------------+------------+ | timestamp | granularity | value | +---------------------------+-------------+------------+ | 2021-10-11T14:20:00+09:00 | 300.0 | 402.734375 | +---------------------------+-------------+------------+ # [instance_network_interface] リソース詳細 ubuntu@dlp ~(keystone)$ openstack metric resource show 2d65a40a-ec43-58ad-bfd9-c5b4df1059ae +-----------------------+-----------------------------------------------------------------------+ | Field | Value | +-----------------------+-----------------------------------------------------------------------+ | created_by_project_id | 611e3ba8938b475fb9dd8124603f18d3 | | created_by_user_id | 6f2ebeebee50478588d34251b7770183 | | creator | 6f2ebeebee50478588d34251b7770183:611e3ba8938b475fb9dd8124603f18d3 | | ended_at | None | | id | 2d65a40a-ec43-58ad-bfd9-c5b4df1059ae | | metrics | network.incoming.bytes: d6550a69-35d8-4aed-8c53-292a79b5281f | | | network.incoming.packets: 59510a1e-b68e-418c-b926-966907663b54 | | | network.outgoing.bytes: 8822ec01-7668-476d-a9c6-40542ee7e291 | | | network.outgoing.packets: 093d196f-bce2-43b7-8593-dde4c4c2b559 | | original_resource_id | instance-00000001-4699d575-1d94-4024-8323-9dfa3599c8d2-tap6009a23e-bc | | project_id | facc545a7f9e4218884c40169158a2dc | | revision_end | None | | revision_start | 2021-10-11T05:11:29.939010+00:00 | | started_at | 2021-10-11T05:11:29.939003+00:00 | | type | instance_network_interface | | user_id | f5a7ffdd6e54434badbd75ba0e6d6ac2 | +-----------------------+-----------------------------------------------------------------------+ # ネットワーク インカミング バイト ubuntu@dlp ~(keystone)$ openstack metric measures show d6550a69-35d8-4aed-8c53-292a79b5281f +---------------------------+-------------+---------+ | timestamp | granularity | value | +---------------------------+-------------+---------+ | 2021-10-11T14:10:00+09:00 | 300.0 | 0.0 | | 2021-10-11T14:20:00+09:00 | 300.0 | 46886.0 | +---------------------------+-------------+---------+ # ネットワーク アウトゴーイング バイト ubuntu@dlp ~(keystone)$ openstack metric measures show 8822ec01-7668-476d-a9c6-40542ee7e291 +---------------------------+-------------+----------+ | timestamp | granularity | value | +---------------------------+-------------+----------+ | 2021-10-11T14:10:00+09:00 | 300.0 | 90.0 | | 2021-10-11T14:20:00+09:00 | 300.0 | 918453.0 | +---------------------------+-------------+----------+ |
Sponsored Link |
|