OpenStack Dalmatian : Ceilometer 利用方法 (Nova Compute)2024/10/16 |
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 openstack-nova-compute |
[2] | 任意のユーザーでインスタンスを起動した場合に収集されるデータの表示例です。 |
# インスタンス起動 [cent@dlp ~(keystone)]$ openstack server list +--------------------------------------+------------+---------+-------------------------------------+----------------+----------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+------------+---------+-------------------------------------+----------------+----------+ | 3d753408-6705-4cbf-acd8-2e09d975b973 | CentOS-St9 | SHUTOFF | private=10.0.0.206, 192.168.100.103 | CentOS-Stream9 | m1.small | +--------------------------------------+------------+---------+-------------------------------------+----------------+----------+
[cent@dlp ~(keystone)]$
openstack server start CentOS-St9
# リソース一覧を表示 # インスタンスで一定の操作をしたのちにデータが取得される [cent@dlp ~(keystone)]$ openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | 3d753408-6705-4cbf-acd8-2e09d975b973 | instance | 756e2b4937c44d3991028e294f92d89a | d9634b44-bf91-5f24-b3e9-a3f82258e684 | instance_disk | 756e2b4937c44d3991028e294f92d89a | 7a63d41b-5fef-566a-bc9d-e4881287698c | instance_network_interface | 756e2b4937c44d3991028e294f92d89a +--------------------------------------+----------------------------+---------------------------------- +----------------------------------+----------------------------------------------------------------------- | user_id | original_resource_id +----------------------------------+----------------------------------------------------------------------- | 19c7530debb54eb0bfe6dc47aae3df32 | 3d753408-6705-4cbf-acd8-2e09d975b973 | 19c7530debb54eb0bfe6dc47aae3df32 | 3d753408-6705-4cbf-acd8-2e09d975b973-vda | 19c7530debb54eb0bfe6dc47aae3df32 | instance-00000001-3d753408-6705-4cbf-acd8-2e09d975b973-tapaf9b32f4-ff +----------------------------------+----------------------------------------------------------------------- +----------------------------------+----------+----------------------------------+--------------+-------------------------------------------------------------------+ | started_at | ended_at | revision_start | revision_end | creator | +----------------------------------+----------+----------------------------------+--------------+-------------------------------------------------------------------+ | 2024-10-16T00:53:10.511984+00:00 | None | 2024-10-16T00:53:10.511987+00:00 | None | 49ad0cbb8d944b8fbe748507c42d0702:aff8e7e402dc4d9e849bbe0e34fa4538 | | 2024-10-16T00:56:00.654393+00:00 | None | 2024-10-16T00:56:00.654397+00:00 | None | 49ad0cbb8d944b8fbe748507c42d0702:aff8e7e402dc4d9e849bbe0e34fa4538 | | 2024-10-16T00:56:00.691379+00:00 | None | 2024-10-16T00:56:00.691383+00:00 | None | 49ad0cbb8d944b8fbe748507c42d0702:aff8e7e402dc4d9e849bbe0e34fa4538 | +----------------------------------+----------+----------------------------------+--------------+-------------------------------------------------------------------+ # [instance] リソース詳細 [cent@dlp ~(keystone)]$ openstack metric resource show 3d753408-6705-4cbf-acd8-2e09d975b973 +-----------------------+-------------------------------------------------------------------+ | Field | Value | +-----------------------+-------------------------------------------------------------------+ | created_by_project_id | aff8e7e402dc4d9e849bbe0e34fa4538 | | created_by_user_id | 49ad0cbb8d944b8fbe748507c42d0702 | | creator | 49ad0cbb8d944b8fbe748507c42d0702:aff8e7e402dc4d9e849bbe0e34fa4538 | | ended_at | None | | id | 3d753408-6705-4cbf-acd8-2e09d975b973 | | metrics | cpu: 2d952685-505f-40f6-b2c1-3cffbc6870bb | | | disk.ephemeral.size: 7c465990-907e-45be-b0a2-b133bf228527 | | | disk.root.size: be095849-5c03-4f3b-b563-c81d295eaccf | | | memory.usage: 6bd4eb52-8df1-4fe6-8ff7-d02803eb9227 | | | memory: da736689-caa1-4f0e-891d-bcb89c2b9bb6 | | | vcpus: 0a9ff9f5-4036-4ce2-963d-66eec72e7056 | | original_resource_id | 3d753408-6705-4cbf-acd8-2e09d975b973 | | project_id | 756e2b4937c44d3991028e294f92d89a | | revision_end | None | | revision_start | 2024-10-16T00:53:10.511987+00:00 | | started_at | 2024-10-16T00:53:10.511984+00:00 | | type | instance | | user_id | 19c7530debb54eb0bfe6dc47aae3df32 | +-----------------------+-------------------------------------------------------------------+ # CPU [cent@dlp ~(keystone)]$ openstack metric measures show 2d952685-505f-40f6-b2c1-3cffbc6870bb +---------------------------+-------------+----------------+ | timestamp | granularity | value | +---------------------------+-------------+----------------+ | 2024-10-16T09:55:00+09:00 | 300.0 | 118670000000.0 | | 2024-10-16T10:00:00+09:00 | 300.0 | 446430000000.0 | +---------------------------+-------------+----------------+ # メモリー使用 [cent@dlp ~(keystone)]$ openstack metric measures show 6bd4eb52-8df1-4fe6-8ff7-d02803eb9227 +---------------------------+-------------+--------------+ | timestamp | granularity | value | +---------------------------+-------------+--------------+ | 2024-10-16T09:55:00+09:00 | 300.0 | 815.28125 | | 2024-10-16T10:00:00+09:00 | 300.0 | 529.93359375 | +---------------------------+-------------+--------------+ # [instance_network_interface] リソース詳細 [cent@dlp ~(keystone)]$ openstack metric resource show 7a63d41b-5fef-566a-bc9d-e4881287698c +-----------------------+-----------------------------------------------------------------------+ | Field | Value | +-----------------------+-----------------------------------------------------------------------+ | created_by_project_id | aff8e7e402dc4d9e849bbe0e34fa4538 | | created_by_user_id | 49ad0cbb8d944b8fbe748507c42d0702 | | creator | 49ad0cbb8d944b8fbe748507c42d0702:aff8e7e402dc4d9e849bbe0e34fa4538 | | ended_at | None | | id | 7a63d41b-5fef-566a-bc9d-e4881287698c | | metrics | network.incoming.bytes: af4163f0-64c1-4561-b749-1f0acf4f9800 | | | network.incoming.packets: 756de964-d599-4ac5-99c2-b799c36ee7f6 | | | network.outgoing.bytes: 96485cfc-b89d-4a16-8b3c-e6af1afc13ee | | | network.outgoing.packets: c0602298-722c-4c13-a4bf-cd8895234a0b | | original_resource_id | instance-00000001-3d753408-6705-4cbf-acd8-2e09d975b973-tapaf9b32f4-ff | | project_id | 756e2b4937c44d3991028e294f92d89a | | revision_end | None | | revision_start | 2024-10-16T00:56:00.691383+00:00 | | started_at | 2024-10-16T00:56:00.691379+00:00 | | type | instance_network_interface | | user_id | 19c7530debb54eb0bfe6dc47aae3df32 | +-----------------------+-----------------------------------------------------------------------+ # ネットワーク インカミング バイト [cent@dlp ~(keystone)]$ openstack metric measures show af4163f0-64c1-4561-b749-1f0acf4f9800 +---------------------------+-------------+-------------+ | timestamp | granularity | value | +---------------------------+-------------+-------------+ | 2024-10-16T09:55:00+09:00 | 300.0 | 833063933.0 | | 2024-10-16T10:00:00+09:00 | 300.0 | 833262237.0 | +---------------------------+-------------+-------------+ # ネットワーク アウトゴーイング バイト [cent@dlp ~(keystone)]$ openstack metric measures show 96485cfc-b89d-4a16-8b3c-e6af1afc13ee +---------------------------+-------------+-----------+ | timestamp | granularity | value | +---------------------------+-------------+-----------+ | 2024-10-16T09:55:00+09:00 | 300.0 | 6845456.0 | | 2024-10-16T10:00:00+09:00 | 300.0 | 7773682.0 | +---------------------------+-------------+-----------+ |
Sponsored Link |