Ubuntu 22.04
Sponsored Link

OpenStack Antelope : Ceilometer 利用方法 (Nova Compute)2023/03/29

 
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

root@node01:~#
systemctl restart nova-compute

[2] 任意のユーザーでインスタンスを作成/起動した場合に収集されるデータの表示例です。
# インスタンス起動

ubuntu@dlp ~(keystone)$
openstack server list

+--------------------------------------+-------------+---------+-------------------------------------+------------+-----------+
| ID                                   | Name        | Status  | Networks                            | Image      | Flavor    |
+--------------------------------------+-------------+---------+-------------------------------------+------------+-----------+
| 11987eec-fb38-4de1-a386-3d1d6001bbd3 | Ubuntu-2204 | SHUTOFF | private=10.0.0.252, 192.168.100.100 | Ubuntu2204 | m1.medium |
+--------------------------------------+-------------+---------+-------------------------------------+------------+-----------+

ubuntu@dlp ~(keystone)$
openstack server start Ubuntu-2204

# リソース一覧を表示
# インスタンス上での一定の操作後にデータが取得される

ubuntu@dlp ~(keystone)$
openstack metric resource list

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| 11987eec-fb38-4de1-a386-3d1d6001bbd3 | instance                   | e294bd7c00314facacdb46c36fb54ee9 
| 29b605b9-5568-5534-b3c4-470045cbcbe0 | instance_network_interface | e294bd7c00314facacdb46c36fb54ee9 
| 55b09db0-31af-58e5-ab82-da9b1d35c949 | instance_disk              | e294bd7c00314facacdb46c36fb54ee9 
+--------------------------------------+----------------------------+----------------------------------
+----------------------------------+-----------------------------------------------------------------------
| user_id                          | original_resource_id                                                  
+----------------------------------+-----------------------------------------------------------------------
| 85236576a97e492791abe70c217c8898 | 11987eec-fb38-4de1-a386-3d1d6001bbd3                                  
| 85236576a97e492791abe70c217c8898 | instance-00000001-11987eec-fb38-4de1-a386-3d1d6001bbd3-tap6b961da5-d0 
| 85236576a97e492791abe70c217c8898 | 11987eec-fb38-4de1-a386-3d1d6001bbd3-vda                              
+----------------------------------+-----------------------------------------------------------------------
+----------------------------------+----------+----------------------------------+--------------
| started_at                       | ended_at | revision_start                   | revision_end 
+----------------------------------+----------+----------------------------------+--------------
| 2023-03-29T02:05:56.850715+00:00 | None     | 2023-03-29T02:05:56.850722+00:00 | None         
| 2023-03-29T02:10:11.914313+00:00 | None     | 2023-03-29T02:10:11.914318+00:00 | None         
| 2023-03-29T02:10:11.998661+00:00 | None     | 2023-03-29T02:10:11.998666+00:00 | None         
+----------------------------------+----------+----------------------------------+--------------
+-------------------------------------------------------------------+
| creator                                                           |
+-------------------------------------------------------------------+
| f88cfb33fa07437ca440ee5ef5642c95:d3dd87fb1a034f7883539a6a4f83781f |
| f88cfb33fa07437ca440ee5ef5642c95:d3dd87fb1a034f7883539a6a4f83781f |
| f88cfb33fa07437ca440ee5ef5642c95:d3dd87fb1a034f7883539a6a4f83781f |
+-------------------------------------------------------------------+

# [instance] リソース詳細

ubuntu@dlp ~(keystone)$
openstack metric resource show 11987eec-fb38-4de1-a386-3d1d6001bbd3

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | d3dd87fb1a034f7883539a6a4f83781f                                  |
| created_by_user_id    | f88cfb33fa07437ca440ee5ef5642c95                                  |
| creator               | f88cfb33fa07437ca440ee5ef5642c95:d3dd87fb1a034f7883539a6a4f83781f |
| ended_at              | None                                                              |
| id                    | 11987eec-fb38-4de1-a386-3d1d6001bbd3                              |
| metrics               | cpu: 803974fc-fbd0-4775-8f02-4543f38f2ab4                         |
|                       | disk.ephemeral.size: 2b734907-8695-4b9a-aa99-f0c47d1d825d         |
|                       | disk.root.size: 2b058968-0615-47e3-8dcd-1f8baaf9e5af              |
|                       | memory.usage: ef18d67f-993f-4204-925d-cc49d4d2621c                |
|                       | memory: 99c08173-8966-4e79-bcba-3db7ed690977                      |
|                       | vcpus: 500db462-982f-4947-8df8-8f205fb4a26b                       |
| original_resource_id  | 11987eec-fb38-4de1-a386-3d1d6001bbd3                              |
| project_id            | e294bd7c00314facacdb46c36fb54ee9                                  |
| revision_end          | None                                                              |
| revision_start        | 2023-03-29T02:05:56.850722+00:00                                  |
| started_at            | 2023-03-29T02:05:56.850715+00:00                                  |
| type                  | instance                                                          |
| user_id               | 85236576a97e492791abe70c217c8898                                  |
+-----------------------+-------------------------------------------------------------------+

# CPU

ubuntu@dlp ~(keystone)$
openstack metric measures show 803974fc-fbd0-4775-8f02-4543f38f2ab4

+---------------------------+-------------+----------------+
| timestamp                 | granularity |          value |
+---------------------------+-------------+----------------+
| 2023-03-29T11:10:00+09:00 |       300.0 | 121690000000.0 |
+---------------------------+-------------+----------------+

# メモリー使用

ubuntu@dlp ~(keystone)$
openstack metric measures show ef18d67f-993f-4204-925d-cc49d4d2621c

+---------------------------+-------------+--------------+
| timestamp                 | granularity |        value |
+---------------------------+-------------+--------------+
| 2023-03-29T11:10:00+09:00 |       300.0 | 453.44921875 |
+---------------------------+-------------+--------------+

# [instance_network_interface] リソース詳細

ubuntu@dlp ~(keystone)$
openstack metric resource show 29b605b9-5568-5534-b3c4-470045cbcbe0

+-----------------------+-----------------------------------------------------------------------+
| Field                 | Value                                                                 |
+-----------------------+-----------------------------------------------------------------------+
| created_by_project_id | d3dd87fb1a034f7883539a6a4f83781f                                      |
| created_by_user_id    | f88cfb33fa07437ca440ee5ef5642c95                                      |
| creator               | f88cfb33fa07437ca440ee5ef5642c95:d3dd87fb1a034f7883539a6a4f83781f     |
| ended_at              | None                                                                  |
| id                    | 29b605b9-5568-5534-b3c4-470045cbcbe0                                  |
| metrics               | network.incoming.bytes: bd75940e-66ed-4ab5-9382-a523b15d83b2          |
|                       | network.incoming.packets: fe203610-ba5c-457f-af66-a2aac99c10ef        |
|                       | network.outgoing.bytes: f204ab01-10bd-4305-a40e-c6dc692436be          |
|                       | network.outgoing.packets: b8f1b2a3-b9c5-4fa0-bb85-2a3984884594        |
| original_resource_id  | instance-00000001-11987eec-fb38-4de1-a386-3d1d6001bbd3-tap6b961da5-d0 |
| project_id            | e294bd7c00314facacdb46c36fb54ee9                                      |
| revision_end          | None                                                                  |
| revision_start        | 2023-03-29T02:10:11.914318+00:00                                      |
| started_at            | 2023-03-29T02:10:11.914313+00:00                                      |
| type                  | instance_network_interface                                            |
| user_id               | 85236576a97e492791abe70c217c8898                                      |
+-----------------------+-----------------------------------------------------------------------+

# ネットワーク インカミング バイト

ubuntu@dlp ~(keystone)$
openstack metric measures show bd75940e-66ed-4ab5-9382-a523b15d83b2

+---------------------------+-------------+----------+
| timestamp                 | granularity |    value |
+---------------------------+-------------+----------+
| 2023-03-29T11:10:00+09:00 |       300.0 | 812237.0 |
+---------------------------+-------------+----------+

# ネットワーク アウトゴーイング バイト

ubuntu@dlp ~(keystone)$
openstack metric measures show f204ab01-10bd-4305-a40e-c6dc692436be

+---------------------------+-------------+------------+
| timestamp                 | granularity |      value |
+---------------------------+-------------+------------+
| 2023-03-29T11:10:00+09:00 |       300.0 | 55614415.0 |
+---------------------------+-------------+------------+
関連コンテンツ