Ubuntu 22.04
Sponsored Link

OpenStack Zed : Ceilometer 利用方法 (Nova Compute)2022/10/11

 
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   |
+--------------------------------------+-------------+---------+-------------------------------------+------------+----------+
| a456ee32-b105-4c5e-8eae-ddccb48f913e | Ubuntu-2204 | SHUTOFF | private=10.0.0.228, 192.168.100.187 | Ubuntu2204 | m1.small |
+--------------------------------------+-------------+---------+-------------------------------------+------------+----------+

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

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

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

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| a456ee32-b105-4c5e-8eae-ddccb48f913e | instance                   | 4dd1e1f6bac441ff9c77002c3ab4c58a 
| dff4e871-53dc-5531-a1f2-3da5e7f69191 | instance_network_interface | 4dd1e1f6bac441ff9c77002c3ab4c58a 
| d90cfa81-9edd-51cb-8521-ac01203c3797 | instance_disk              | 4dd1e1f6bac441ff9c77002c3ab4c58a 
+--------------------------------------+----------------------------+----------------------------------
+----------------------------------+-----------------------------------------------------------------------
| user_id                          | original_resource_id                                                  
+----------------------------------+-----------------------------------------------------------------------
| 9345b7f4de21427abf31ad308cf952f8 | a456ee32-b105-4c5e-8eae-ddccb48f913e                                  
| 9345b7f4de21427abf31ad308cf952f8 | instance-00000001-a456ee32-b105-4c5e-8eae-ddccb48f913e-tap73b28cfb-6c 
| 9345b7f4de21427abf31ad308cf952f8 | a456ee32-b105-4c5e-8eae-ddccb48f913e-vda                              
+----------------------------------+-----------------------------------------------------------------------
+----------------------------------+----------+----------------------------------+--------------
| started_at                       | ended_at | revision_start                   | revision_end 
+----------------------------------+----------+----------------------------------+--------------
| 2022-10-11T00:27:40.978419+00:00 | None     | 2022-10-11T00:27:40.978426+00:00 | None         
| 2022-10-11T00:31:57.280267+00:00 | None     | 2022-10-11T00:31:57.280272+00:00 | None         
| 2022-10-11T00:31:57.410772+00:00 | None     | 2022-10-11T00:31:57.410777+00:00 | None         
+----------------------------------+----------+----------------------------------+--------------
+-------------------------------------------------------------------+
| creator                                                           |
+-------------------------------------------------------------------+
| 1070f194127a4a52aca630dab3365662:ee51c09c765e4a4d958c2bcc4dbb5665 |
| 1070f194127a4a52aca630dab3365662:ee51c09c765e4a4d958c2bcc4dbb5665 |
| 1070f194127a4a52aca630dab3365662:ee51c09c765e4a4d958c2bcc4dbb5665 |
+-------------------------------------------------------------------+

# [instance] リソース詳細

ubuntu@dlp ~(keystone)$
openstack metric resource show a456ee32-b105-4c5e-8eae-ddccb48f913e

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | ee51c09c765e4a4d958c2bcc4dbb5665                                  |
| created_by_user_id    | 1070f194127a4a52aca630dab3365662                                  |
| creator               | 1070f194127a4a52aca630dab3365662:ee51c09c765e4a4d958c2bcc4dbb5665 |
| ended_at              | None                                                              |
| id                    | a456ee32-b105-4c5e-8eae-ddccb48f913e                              |
| metrics               | cpu: aef862d7-ded3-48e1-b973-d73cf860ff9e                         |
|                       | disk.ephemeral.size: abd0a107-2365-46d8-8cf3-8c44c56c0011         |
|                       | disk.root.size: 83f387e1-2e6f-4a0d-85ac-e1b3878fd5c8              |
|                       | memory.usage: e5104a0a-cd34-4707-ac14-a0208791fb45                |
|                       | memory: f796423f-7171-4f5f-9e26-ba865da74f28                      |
|                       | vcpus: 6a30a290-e24c-4bbd-bc0b-d2e04aa75c35                       |
| original_resource_id  | a456ee32-b105-4c5e-8eae-ddccb48f913e                              |
| project_id            | 4dd1e1f6bac441ff9c77002c3ab4c58a                                  |
| revision_end          | None                                                              |
| revision_start        | 2022-10-11T00:27:40.978426+00:00                                  |
| started_at            | 2022-10-11T00:27:40.978419+00:00                                  |
| type                  | instance                                                          |
| user_id               | 9345b7f4de21427abf31ad308cf952f8                                  |
+-----------------------+-------------------------------------------------------------------+

# CPU

ubuntu@dlp ~(keystone)$
openstack metric measures show aef862d7-ded3-48e1-b973-d73cf860ff9e

+---------------------------+-------------+----------------+
| timestamp                 | granularity |          value |
+---------------------------+-------------+----------------+
| 2022-10-11T00:30:00+00:00 |       300.0 | 141620000000.0 |
+---------------------------+-------------+----------------+

# メモリー使用

ubuntu@dlp ~(keystone)$
openstack metric measures show e5104a0a-cd34-4707-ac14-a0208791fb45

+---------------------------+-------------+-------------+
| timestamp                 | granularity |       value |
+---------------------------+-------------+-------------+
| 2022-10-11T00:30:00+00:00 |       300.0 | 320.5859375 |
+---------------------------+-------------+-------------+

# [instance_network_interface] リソース詳細

ubuntu@dlp ~(keystone)$
openstack metric resource show dff4e871-53dc-5531-a1f2-3da5e7f69191

+-----------------------+-----------------------------------------------------------------------+
| Field                 | Value                                                                 |
+-----------------------+-----------------------------------------------------------------------+
| created_by_project_id | ee51c09c765e4a4d958c2bcc4dbb5665                                      |
| created_by_user_id    | 1070f194127a4a52aca630dab3365662                                      |
| creator               | 1070f194127a4a52aca630dab3365662:ee51c09c765e4a4d958c2bcc4dbb5665     |
| ended_at              | None                                                                  |
| id                    | dff4e871-53dc-5531-a1f2-3da5e7f69191                                  |
| metrics               | network.incoming.bytes: b4231815-a5f8-4f32-8fbd-b8d17adaef72          |
|                       | network.incoming.packets: 5bc366aa-f879-45e4-8b20-3f7ea0cda03e        |
|                       | network.outgoing.bytes: 98c15104-07cc-489f-9ace-ede77502e674          |
|                       | network.outgoing.packets: 67af754a-f2f1-4cfd-9a6e-0c62b27a2ff2        |
| original_resource_id  | instance-00000001-a456ee32-b105-4c5e-8eae-ddccb48f913e-tap73b28cfb-6c |
| project_id            | 4dd1e1f6bac441ff9c77002c3ab4c58a                                      |
| revision_end          | None                                                                  |
| revision_start        | 2022-10-11T00:31:57.280272+00:00                                      |
| started_at            | 2022-10-11T00:31:57.280267+00:00                                      |
| type                  | instance_network_interface                                            |
| user_id               | 9345b7f4de21427abf31ad308cf952f8                                      |
+-----------------------+-----------------------------------------------------------------------+

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

ubuntu@dlp ~(keystone)$
openstack metric measures show b4231815-a5f8-4f32-8fbd-b8d17adaef72

+---------------------------+-------------+----------+
| timestamp                 | granularity |    value |
+---------------------------+-------------+----------+
| 2022-10-11T00:30:00+00:00 |       300.0 | 465603.0 |
+---------------------------+-------------+----------+

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

ubuntu@dlp ~(keystone)$
openstack metric measures show 98c15104-07cc-489f-9ace-ede77502e674

+---------------------------+-------------+------------+
| timestamp                 | granularity |      value |
+---------------------------+-------------+------------+
| 2022-10-11T00:30:00+00:00 |       300.0 | 27608551.0 |
+---------------------------+-------------+------------+
関連コンテンツ