Debian 11 Bullseye
Sponsored Link

OpenStack Victoria : Ceilometer 利用方法 (Nova Compute)2021/09/02

 
OpenStack Telemetry Service (Ceilometer) の利用方法です。
当例では以下のような環境を例に Ceilometer サービスをインストールしています。
------------+---------------------------+---------------------------+------------
            |                           |                           |
        eth0|10.0.0.30              eth0|10.0.0.50              eth0|10.0.0.51
+-----------+-----------+   +-----------+-----------+   +-----------+-----------+
|    [ Control Node ]   |   |    [ Network Node ]   |   |    [ Compute Node ]   |
|                       |   |                       |   |                       |
|  MariaDB    RabbitMQ  |   |      Linux Bridge     |   |        Libvirt        |
|  Memcached  httpd     |   |        L2 Agent       |   |     Nova Compute      |
|  Keystone   Glance    |   |        L3 Agent       |   |      Linux Bridge     |
|  Nova_API  Cinder_API |   |     Metadata Agent    |   |        L2 Agent       |
|  Neutron Server       |   |     Cinder Volume     |   |   Ceilometer Compute  |
|  Metadata Agent       |   |        Heat API       |   |                       |
|                       |   |      Heat Engine      |   |                       |
|                       |   |    Gnocchi  httpd     |   |                       |
|                       |   |   Ceilometer Central  |   |                       |
+-----------------------+   +-----------------------+   +-----------------------+

[1] Compute サービスの各種データ収集を有効にするには、Compute ノードの Nova Compute を以下のように設定します。
root@node01:~#
vi /etc/nova/nova.conf
# [DEFAULT] セクション内の任意の場所へ追記

instance_usage_audit = True
instance_usage_audit_period = hour
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   |
+--------------------------------------+-----------+---------+-------------------------------------+----------+----------+
| 86981ae7-d713-414f-966c-ac22387a3226 | Debian-11 | SHUTOFF | private=192.168.100.211, 10.0.0.249 | Debian11 | m1.small |
+--------------------------------------+-----------+---------+-------------------------------------+----------+----------+

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

# リソース一覧を表示

# インスタンス上での一定の操作後にデータが取得される

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

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| 86981ae7-d713-414f-966c-ac22387a3226 | instance                   | cba75a02a921457db62b660f3d0b57c4 
| 0697ef58-ac47-5747-bdeb-d4a60a3f068c | instance_disk              | cba75a02a921457db62b660f3d0b57c4 
| 6d90e531-c30c-5aa3-bdd2-2b43032ef4cf | instance_network_interface | cba75a02a921457db62b660f3d0b57c4 
+--------------------------------------+----------------------------+----------------------------------
+----------------------------------+-----------------------------------------------------------------------
| user_id                          | original_resource_id                                                  
+----------------------------------+-----------------------------------------------------------------------
| 62a91aa559f64acab11861ed7cd51ecc | 86981ae7-d713-414f-966c-ac22387a3226                                  
| 62a91aa559f64acab11861ed7cd51ecc | 86981ae7-d713-414f-966c-ac22387a3226-vda                              
| 62a91aa559f64acab11861ed7cd51ecc | instance-00000002-86981ae7-d713-414f-966c-ac22387a3226-tap748fe8d9-19 
+----------------------------------+-----------------------------------------------------------------------
+----------------------------------+----------+----------------------------------+--------------
| started_at                       | ended_at | revision_start                   | revision_end 
+----------------------------------+----------+----------------------------------+--------------
| 2021-09-02T05:36:15.009997+00:00 | None     | 2021-09-02T05:36:15.010013+00:00 | None         
| 2021-09-02T05:37:28.988357+00:00 | None     | 2021-09-02T05:37:28.988387+00:00 | None         
| 2021-09-02T05:37:29.047653+00:00 | None     | 2021-09-02T05:37:29.047660+00:00 | None         
+----------------------------------+----------+----------------------------------+--------------
+-------------------------------------------------------------------+
| creator                                                           |
+-------------------------------------------------------------------+
| 64e62f8bd1714a02998bdd2c3015f940:1718217eee4b4f2ea143d65122864fe0 |
| 64e62f8bd1714a02998bdd2c3015f940:1718217eee4b4f2ea143d65122864fe0 |
| 64e62f8bd1714a02998bdd2c3015f940:1718217eee4b4f2ea143d65122864fe0 |
+-------------------------------------------------------------------+

# [instance] リソース詳細

debian@dlp ~(keystone)$
openstack metric resource show 86981ae7-d713-414f-966c-ac22387a3226

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | 1718217eee4b4f2ea143d65122864fe0                                  |
| created_by_user_id    | 64e62f8bd1714a02998bdd2c3015f940                                  |
| creator               | 64e62f8bd1714a02998bdd2c3015f940:1718217eee4b4f2ea143d65122864fe0 |
| ended_at              | None                                                              |
| id                    | 86981ae7-d713-414f-966c-ac22387a3226                              |
| metrics               | cpu: aeb96ffd-bcfb-485c-8ccd-a7a8130a7710                         |
|                       | disk.ephemeral.size: a05fae85-1f0f-41ad-92a4-2e3bbe3aee59         |
|                       | disk.root.size: c3d97c7f-1e73-4bb2-a497-7fa48df43751              |
|                       | memory.usage: ae01d4f4-ab15-4f0c-aa9e-47f2324d3a74                |
|                       | memory: d0717974-379e-407c-8e73-dcb7eb7f05a3                      |
|                       | vcpus: cfd57392-9aa5-490d-b022-95069564c66e                       |
| original_resource_id  | 86981ae7-d713-414f-966c-ac22387a3226                              |
| project_id            | cba75a02a921457db62b660f3d0b57c4                                  |
| revision_end          | None                                                              |
| revision_start        | 2021-09-02T05:36:15.010013+00:00                                  |
| started_at            | 2021-09-02T05:36:15.009997+00:00                                  |
| type                  | instance                                                          |
| user_id               | 62a91aa559f64acab11861ed7cd51ecc                                  |
+-----------------------+-------------------------------------------------------------------+

# CPU

debian@dlp ~(keystone)$
openstack metric measures show aeb96ffd-bcfb-485c-8ccd-a7a8130a7710

+---------------------------+-------------+---------------+
| timestamp                 | granularity |         value |
+---------------------------+-------------+---------------+
| 2021-09-02T00:35:00-05:00 |       300.0 | 32970000000.0 |
+---------------------------+-------------+---------------+

# メモリー使用

debian@dlp ~(keystone)$
openstack metric measures show ae01d4f4-ab15-4f0c-aa9e-47f2324d3a74

+---------------------------+-------------+--------------+
| timestamp                 | granularity |        value |
+---------------------------+-------------+--------------+
| 2021-09-02T00:35:00-05:00 |       300.0 | 572.55859375 |
+---------------------------+-------------+--------------+

# [instance_network_interface] リソース詳細

debian@dlp ~(keystone)$
openstack metric resource show 6d90e531-c30c-5aa3-bdd2-2b43032ef4cf

+-----------------------+-----------------------------------------------------------------------+
| Field                 | Value                                                                 |
+-----------------------+-----------------------------------------------------------------------+
| created_by_project_id | 1718217eee4b4f2ea143d65122864fe0                                      |
| created_by_user_id    | 64e62f8bd1714a02998bdd2c3015f940                                      |
| creator               | 64e62f8bd1714a02998bdd2c3015f940:1718217eee4b4f2ea143d65122864fe0     |
| ended_at              | None                                                                  |
| id                    | 6d90e531-c30c-5aa3-bdd2-2b43032ef4cf                                  |
| metrics               | network.incoming.bytes: 1f0421ae-f335-454c-87b6-61a34964b6be          |
|                       | network.incoming.packets: 99fa4c2d-7746-4dc9-8d30-dc14e76e5237        |
|                       | network.outgoing.bytes: 4a04f950-39ee-4b0d-ae88-a1feba6c3a98          |
|                       | network.outgoing.packets: 03abf41b-1363-458e-bf42-e3fd18184478        |
| original_resource_id  | instance-00000002-86981ae7-d713-414f-966c-ac22387a3226-tap748fe8d9-19 |
| project_id            | cba75a02a921457db62b660f3d0b57c4                                      |
| revision_end          | None                                                                  |
| revision_start        | 2021-09-02T05:37:29.047660+00:00                                      |
| started_at            | 2021-09-02T05:37:29.047653+00:00                                      |
| type                  | instance_network_interface                                            |
| user_id               | 62a91aa559f64acab11861ed7cd51ecc                                      |
+-----------------------+-----------------------------------------------------------------------+

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

debian@dlp ~(keystone)$
openstack metric measures show 1f0421ae-f335-454c-87b6-61a34964b6be

+---------------------------+-------------+----------+
| timestamp                 | granularity |    value |
+---------------------------+-------------+----------+
| 2021-09-02T00:35:00-05:00 |       300.0 | 430148.0 |
+---------------------------+-------------+----------+

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

debian@dlp ~(keystone)$
openstack metric measures show 4a04f950-39ee-4b0d-ae88-a1feba6c3a98

+---------------------------+-------------+---------+
| timestamp                 | granularity |   value |
+---------------------------+-------------+---------+
| 2021-09-02T00:35:00-05:00 |       300.0 | 49529.0 |
+---------------------------+-------------+---------+
関連コンテンツ