Debian 12 bookworm
Sponsored Link

OpenStack Zed : Ceilometer 利用方法 (Nova Compute)2023/06/30

 
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  |  |  Neutron L2/L3 Agent  |  |        Libvirt        |
|  Memcached  Nginx     |  |   Neutron Metadata    |  |      Nova Compute     |
|  Keystone   httpd     |  |     Open vSwitch      |  |    Neutron L2 Agent   |
|  Glance     Nova API  |  |     iSCSI Target      |  |      Open vSwitch     |
|  Neutron Server       |  |     Cinder Volume     |  |   Ceilometer Compute  |
|  Neutron Metadata     |  |     httpd  Gnocchi    |  |                       |
|  Cinder API           |  |   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] 任意のユーザーでインスタンスを作成/起動した場合に収集されるデータの表示例です。
# インスタンス起動

debian@dlp ~(keystone)$
openstack server list

+--------------------------------------+-----------+---------+------------------------------------+----------+-----------+
| ID                                   | Name      | Status  | Networks                           | Image    | Flavor    |
+--------------------------------------+-----------+---------+------------------------------------+----------+-----------+
| c3a4a792-a7ac-41bd-8c93-7fd162016f22 | Debian-12 | SHUTOFF | private=10.0.0.241, 192.168.100.66 | Debian12 | m1.medium |
+--------------------------------------+-----------+---------+------------------------------------+----------+-----------+

debian@dlp ~(keystone)$
openstack server start Debian-12

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

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

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| c3a4a792-a7ac-41bd-8c93-7fd162016f22 | instance                   | 1c2f5dc8c4f9494fbaaa4217c8e3585a 
| 88e37527-710f-53a8-9bb3-4cf76791b60b | instance_disk              | 1c2f5dc8c4f9494fbaaa4217c8e3585a 
| 18c74205-a37f-5ea3-b7db-c342b76a24c2 | instance_network_interface | 1c2f5dc8c4f9494fbaaa4217c8e3585a 
+--------------------------------------+----------------------------+----------------------------------
+----------------------------------+-----------------------------------------------------------------------
| user_id                          | original_resource_id                                                  
+----------------------------------+-----------------------------------------------------------------------
| de51d5f0ee2c485885877d21f5b424e0 | c3a4a792-a7ac-41bd-8c93-7fd162016f22                                  
| de51d5f0ee2c485885877d21f5b424e0 | c3a4a792-a7ac-41bd-8c93-7fd162016f22-vda                              
| de51d5f0ee2c485885877d21f5b424e0 | instance-00000002-c3a4a792-a7ac-41bd-8c93-7fd162016f22-tapb1189c54-2f 
+----------------------------------+-----------------------------------------------------------------------
+----------------------------------+----------+----------------------------------+--------------
| started_at                       | ended_at | revision_start                   | revision_end 
+----------------------------------+----------+----------------------------------+--------------
| 2023-06-30T02:27:46.589318+00:00 | None     | 2023-06-30T02:27:46.589325+00:00 | None         
| 2023-06-30T02:29:55.518815+00:00 | None     | 2023-06-30T02:29:55.518823+00:00 | None         
| 2023-06-30T02:29:55.639728+00:00 | None     | 2023-06-30T02:29:55.639736+00:00 | None         
+----------------------------------+----------+----------------------------------+--------------
+-------------------------------------------------------------------+
| creator                                                           |
+-------------------------------------------------------------------+
| 89f390200afd4423bd9322787a94efa8:d8b09d86ed7743039f92b2e542ea26c1 |
| 89f390200afd4423bd9322787a94efa8:d8b09d86ed7743039f92b2e542ea26c1 |
| 89f390200afd4423bd9322787a94efa8:d8b09d86ed7743039f92b2e542ea26c1 |
+-------------------------------------------------------------------+

# [instance] リソース詳細

debian@dlp ~(keystone)$
openstack metric resource show c3a4a792-a7ac-41bd-8c93-7fd162016f22

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | d8b09d86ed7743039f92b2e542ea26c1                                  |
| created_by_user_id    | 89f390200afd4423bd9322787a94efa8                                  |
| creator               | 89f390200afd4423bd9322787a94efa8:d8b09d86ed7743039f92b2e542ea26c1 |
| ended_at              | None                                                              |
| id                    | c3a4a792-a7ac-41bd-8c93-7fd162016f22                              |
| metrics               | cpu: 40acf516-9019-4324-8343-f9bd575eccbd                         |
|                       | disk.ephemeral.size: 5556c196-739e-4e41-b582-36f679e1397e         |
|                       | disk.root.size: 236c0af5-0efe-41c7-90f5-ff39eb5a0687              |
|                       | memory.usage: e9e487c3-8d40-400a-b38b-7a5a9b12a993                |
|                       | memory: 0637ecac-c73b-4168-a04c-8259112d0cbc                      |
|                       | vcpus: 378e2179-48fb-4c5c-a45a-aca1d5c14a43                       |
| original_resource_id  | c3a4a792-a7ac-41bd-8c93-7fd162016f22                              |
| project_id            | 1c2f5dc8c4f9494fbaaa4217c8e3585a                                  |
| revision_end          | None                                                              |
| revision_start        | 2023-06-30T02:27:46.589325+00:00                                  |
| started_at            | 2023-06-30T02:27:46.589318+00:00                                  |
| type                  | instance                                                          |
| user_id               | de51d5f0ee2c485885877d21f5b424e0                                  |
+-----------------------+-------------------------------------------------------------------+

# CPU

debian@dlp ~(keystone)$
openstack metric measures show 40acf516-9019-4324-8343-f9bd575eccbd

+---------------------------+-------------+---------------+
| timestamp                 | granularity |         value |
+---------------------------+-------------+---------------+
| 2023-06-29T21:25:00-05:00 |       300.0 | 79640000000.0 |
+---------------------------+-------------+---------------+

# メモリー使用

debian@dlp ~(keystone)$
openstack metric measures show e9e487c3-8d40-400a-b38b-7a5a9b12a993

+---------------------------+-------------+-------------+
| timestamp                 | granularity |       value |
+---------------------------+-------------+-------------+
| 2023-06-29T21:25:00-05:00 |       300.0 | 330.6953125 |
+---------------------------+-------------+-------------+

# [instance_network_interface] リソース詳細

debian@dlp ~(keystone)$
openstack metric resource show 18c74205-a37f-5ea3-b7db-c342b76a24c2

+-----------------------+-----------------------------------------------------------------------+
| Field                 | Value                                                                 |
+-----------------------+-----------------------------------------------------------------------+
| created_by_project_id | d8b09d86ed7743039f92b2e542ea26c1                                      |
| created_by_user_id    | 89f390200afd4423bd9322787a94efa8                                      |
| creator               | 89f390200afd4423bd9322787a94efa8:d8b09d86ed7743039f92b2e542ea26c1     |
| ended_at              | None                                                                  |
| id                    | 18c74205-a37f-5ea3-b7db-c342b76a24c2                                  |
| metrics               | network.incoming.bytes: 452b10be-4360-4cb5-9f4f-3102ec88ab6c          |
|                       | network.incoming.packets: f33c54ec-909b-4984-b103-4ab67b9ecdd4        |
|                       | network.outgoing.bytes: 7adcc665-831c-4950-9abe-321ab94c4dfd          |
|                       | network.outgoing.packets: 17c27ac2-4b66-4c94-8363-4e7a8761e029        |
| original_resource_id  | instance-00000002-c3a4a792-a7ac-41bd-8c93-7fd162016f22-tapb1189c54-2f |
| project_id            | 1c2f5dc8c4f9494fbaaa4217c8e3585a                                      |
| revision_end          | None                                                                  |
| revision_start        | 2023-06-30T02:29:55.639736+00:00                                      |
| started_at            | 2023-06-30T02:29:55.639728+00:00                                      |
| type                  | instance_network_interface                                            |
| user_id               | de51d5f0ee2c485885877d21f5b424e0                                      |
+-----------------------+-----------------------------------------------------------------------+

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

debian@dlp ~(keystone)$
openstack metric measures show 452b10be-4360-4cb5-9f4f-3102ec88ab6c

+---------------------------+-------------+-----------+
| timestamp                 | granularity |     value |
+---------------------------+-------------+-----------+
| 2023-06-29T21:25:00-05:00 |       300.0 | 4942104.0 |
+---------------------------+-------------+-----------+

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

debian@dlp ~(keystone)$
openstack metric measures show 7adcc665-831c-4950-9abe-321ab94c4dfd

+---------------------------+-------------+---------+
| timestamp                 | granularity |   value |
+---------------------------+-------------+---------+
| 2023-06-29T21:25:00-05:00 |       300.0 | 84504.0 |
+---------------------------+-------------+---------+
関連コンテンツ