OpenStack Caracal : Ceilometer 利用方法 (Nova Compute)2024/08/08 |
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 | +--------------------------------------+------------+---------+------------------------------------+----------------+----------+ | 1d0c2140-098d-4a1a-a705-82d7755d7c84 | CentOS-St9 | SHUTOFF | private=10.0.0.250, 192.168.100.65 | CentOS-Stream9 | m1.small | +--------------------------------------+------------+---------+------------------------------------+----------------+----------+
[cent@dlp ~(keystone)]$
openstack server start CentOS-St9
# リソース一覧を表示 # インスタンスで一定の操作をしたのちにデータが取得される [cent@dlp ~(keystone)]$ openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | 1d0c2140-098d-4a1a-a705-82d7755d7c84 | instance | 03a31c43ede44dcbaacb05c870920e81 | 1e69e83f-7283-58a2-a1f2-18093aad665d | instance_network_interface | 03a31c43ede44dcbaacb05c870920e81 | 5770e056-a76c-5bba-9b71-aef9fdefd317 | instance_disk | 03a31c43ede44dcbaacb05c870920e81 +--------------------------------------+----------------------------+---------------------------------- +----------------------------------+----------------------------------------------------------------------- | user_id | original_resource_id +----------------------------------+----------------------------------------------------------------------- | 8a9b46168b42480f889ad4fad3ca6ee4 | 1d0c2140-098d-4a1a-a705-82d7755d7c84 | 8a9b46168b42480f889ad4fad3ca6ee4 | instance-00000001-1d0c2140-098d-4a1a-a705-82d7755d7c84-tapd720c61d-44 | 8a9b46168b42480f889ad4fad3ca6ee4 | 1d0c2140-098d-4a1a-a705-82d7755d7c84-vda +----------------------------------+----------------------------------------------------------------------- +----------------------------------+----------+----------------------------------+-------------- | started_at | ended_at | revision_start | revision_end +----------------------------------+----------+----------------------------------+-------------- | 2024-08-07T09:42:27.358206+00:00 | None | 2024-08-07T09:42:27.358212+00:00 | None | 2024-08-07T09:44:50.869134+00:00 | None | 2024-08-07T09:44:50.869140+00:00 | None | 2024-08-07T09:44:50.903202+00:00 | None | 2024-08-07T09:44:50.903208+00:00 | None +----------------------------------+----------+----------------------------------+-------------- +-------------------------------------------------------------------+ | creator | +-------------------------------------------------------------------+ | c35246b749884d4fae8a3bfaaa0cf7ea:0b826f1bf49d489494e94badc32f2cea | | c35246b749884d4fae8a3bfaaa0cf7ea:0b826f1bf49d489494e94badc32f2cea | | c35246b749884d4fae8a3bfaaa0cf7ea:0b826f1bf49d489494e94badc32f2cea | +-------------------------------------------------------------------+ # [instance] リソース詳細 [cent@dlp ~(keystone)]$ openstack metric resource show 1d0c2140-098d-4a1a-a705-82d7755d7c84 +-----------------------+-------------------------------------------------------------------+ | Field | Value | +-----------------------+-------------------------------------------------------------------+ | created_by_project_id | 0b826f1bf49d489494e94badc32f2cea | | created_by_user_id | c35246b749884d4fae8a3bfaaa0cf7ea | | creator | c35246b749884d4fae8a3bfaaa0cf7ea:0b826f1bf49d489494e94badc32f2cea | | ended_at | None | | id | 1d0c2140-098d-4a1a-a705-82d7755d7c84 | | metrics | cpu: ed108f96-0075-4bb2-af15-9eece42c2dbb | | | disk.ephemeral.size: 4ac2f722-e75c-4c5e-a305-c8c8f5c30a01 | | | disk.root.size: 7624d848-1bec-4708-91fa-8a835ed10b76 | | | memory.usage: 5a39c21e-bb40-4ff6-9ba8-72d62706e1bd | | | memory: 3f6823fa-e132-42a5-8238-f343e88778f2 | | | vcpus: 166e6bb6-5ffb-478d-bcca-bdcc7b95615a | | original_resource_id | 1d0c2140-098d-4a1a-a705-82d7755d7c84 | | project_id | 03a31c43ede44dcbaacb05c870920e81 | | revision_end | None | | revision_start | 2024-08-07T09:42:27.358212+00:00 | | started_at | 2024-08-07T09:42:27.358206+00:00 | | type | instance | | user_id | 8a9b46168b42480f889ad4fad3ca6ee4 | +-----------------------+-------------------------------------------------------------------+ # CPU [cent@dlp ~(keystone)]$ openstack metric measures show ed108f96-0075-4bb2-af15-9eece42c2dbb +---------------------------+-------------+---------------+ | timestamp | granularity | value | +---------------------------+-------------+---------------+ | 2024-08-07T18:40:00+09:00 | 300.0 | 27210000000.0 | | 2024-08-07T18:45:00+09:00 | 300.0 | 78360000000.0 | +---------------------------+-------------+---------------+ # メモリー使用 [cent@dlp ~(keystone)]$ openstack metric measures show 5a39c21e-bb40-4ff6-9ba8-72d62706e1bd +---------------------------+-------------+--------------+ | timestamp | granularity | value | +---------------------------+-------------+--------------+ | 2024-08-07T18:40:00+09:00 | 300.0 | 453.7109375 | | 2024-08-07T18:45:00+09:00 | 300.0 | 448.08203125 | +---------------------------+-------------+--------------+ # [instance_network_interface] リソース詳細 [cent@dlp ~(keystone)]$ openstack metric resource show 1e69e83f-7283-58a2-a1f2-18093aad665d +-----------------------+-----------------------------------------------------------------------+ | Field | Value | +-----------------------+-----------------------------------------------------------------------+ | created_by_project_id | 0b826f1bf49d489494e94badc32f2cea | | created_by_user_id | c35246b749884d4fae8a3bfaaa0cf7ea | | creator | c35246b749884d4fae8a3bfaaa0cf7ea:0b826f1bf49d489494e94badc32f2cea | | ended_at | None | | id | 1e69e83f-7283-58a2-a1f2-18093aad665d | | metrics | network.incoming.bytes: 4640b857-a085-4168-a8ea-8e7ae3a1de71 | | | network.incoming.packets: a3bd3c1a-1f5b-471d-8ded-50ff4b623944 | | | network.outgoing.bytes: 07114c63-35a2-47df-8d40-96b53f53d299 | | | network.outgoing.packets: 98d82d35-471c-4e25-b03f-923cc696a332 | | original_resource_id | instance-00000001-1d0c2140-098d-4a1a-a705-82d7755d7c84-tapd720c61d-44 | | project_id | 03a31c43ede44dcbaacb05c870920e81 | | revision_end | None | | revision_start | 2024-08-07T09:44:50.869140+00:00 | | started_at | 2024-08-07T09:44:50.869134+00:00 | | type | instance_network_interface | | user_id | 8a9b46168b42480f889ad4fad3ca6ee4 | +-----------------------+-----------------------------------------------------------------------+ # ネットワーク インカミング バイト [cent@dlp ~(keystone)]$ openstack metric measures show 4640b857-a085-4168-a8ea-8e7ae3a1de71 +---------------------------+-------------+------------+ | timestamp | granularity | value | +---------------------------+-------------+------------+ | 2024-08-07T18:40:00+09:00 | 300.0 | 4024287.0 | | 2024-08-07T18:45:00+09:00 | 300.0 | 53288254.0 | +---------------------------+-------------+------------+ # ネットワーク アウトゴーイング バイト [cent@dlp ~(keystone)]$ openstack metric measures show 07114c63-35a2-47df-8d40-96b53f53d299 +---------------------------+-------------+-----------+ | timestamp | granularity | value | +---------------------------+-------------+-----------+ | 2024-08-07T18:40:00+09:00 | 300.0 | 156886.0 | | 2024-08-07T18:45:00+09:00 | 300.0 | 1460751.0 | +---------------------------+-------------+-----------+ |
Sponsored Link |