CentOS 8
Sponsored Link

OpenStack Victoria : Ceilometer 利用方法 (Glance)2020/11/20

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

[1] Image サービスの各種データ収集を有効にするには、Glance を以下のように設定します。
[root@dlp ~(keystone)]#
vi /etc/glance/glance-api.conf
# 最終行へ追記

[oslo_messaging_notifications]
driver = messagingv2
# RabbitMQ 接続情報
transport_url = rabbit://openstack:password@10.0.0.30
[root@dlp ~(keystone)]#
systemctl restart openstack-glance-api

[2] イメージを追加等した場合に収集されるデータの表示例です。
# リソース一覧

[root@dlp ~(keystone)]#
openstack metric resource list

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| 852fbb21-1dd6-4268-9532-54876bbc4567 | instance                   | 8cc9f93ed89f40e28a610d025462c... 
| 66daeeec-3425-5ef9-97e6-4799ce18dea5 | instance_disk              | 8cc9f93ed89f40e28a610d025462c... 
| a13ba637-1038-5ce5-9f0e-8aac70952d47 | instance_network_interface | 8cc9f93ed89f40e28a610d025462c... 
+--------------------------------------+----------------------------+----------------------------------

# テストとしてイメージ登録

[root@dlp ~(keystone)]#
openstack image create "CentOS82" --file /var/kvm/images/centos8.qcow2 --disk-format qcow2 --container-format bare --public

# テストとしてイメージダウンロード

[root@dlp ~(keystone)]#
openstack image save --file centos82.qcow2 CentOS82

# リソース一覧

[root@dlp ~(keystone)]#
openstack metric resource list

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| 852fbb21-1dd6-4268-9532-54876bbc4567 | instance                   | 8cc9f93ed89f40e28a610d025462c... 
| 66daeeec-3425-5ef9-97e6-4799ce18dea5 | instance_disk              | 8cc9f93ed89f40e28a610d025462c... 
| a13ba637-1038-5ce5-9f0e-8aac70952d47 | instance_network_interface | 8cc9f93ed89f40e28a610d025462c... 
| 9b2a5d40-93e3-411a-ba27-39f81f1008c6 | image                      | bd0827a1282f45f28c4100b77289e... 
+--------------------------------------+----------------------------+----------------------------------

# [image] リソース詳細

[root@dlp ~(keystone)]#
openstack metric resource show 9b2a5d40-93e3-411a-ba27-39f81f1008c6

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | 4e42859fe8704e8aaddb5369551b6c52                                  |
| created_by_user_id    | fa8f7a76bb114819950cfd6b99238fee                                  |
| creator               | fa8f7a76bb114819950cfd6b99238fee:4e42859fe8704e8aaddb5369551b6c52 |
| ended_at              | None                                                              |
| id                    | 9b2a5d40-93e3-411a-ba27-39f81f1008c6                              |
| metrics               | image.download: d553720c-8419-4f69-9df5-60abda4160b4              |
|                       | image.serve: b2abae67-f5fb-4291-be96-e8e7166a792b                 |
|                       | image.size: eb867e47-a427-4f79-a2c0-1bf67412238c                  |
| original_resource_id  | 9b2a5d40-93e3-411a-ba27-39f81f1008c6                              |
| project_id            | bd0827a1282f45f28c4100b77289eb0a                                  |
| revision_end          | None                                                              |
| revision_start        | 2020-11-20T08:05:22.559521+00:00                                  |
| started_at            | 2020-11-20T08:05:22.559511+00:00                                  |
| type                  | image                                                             |
| user_id               | None                                                              |
+-----------------------+-------------------------------------------------------------------+

# イメージ ダウンロード データ

[root@dlp ~(keystone)]#
openstack metric measures show d553720c-8419-4f69-9df5-60abda4160b4

+---------------------------+-------------+---------------+
| timestamp                 | granularity |         value |
+---------------------------+-------------+---------------+
| 2020-11-20T17:05:00+09:00 |       300.0 | 10739318784.0 |
+---------------------------+-------------+---------------+

# イメージ サイズ データ

[root@dlp ~(keystone)]#
openstack metric measures show eb867e47-a427-4f79-a2c0-1bf67412238c

+---------------------------+-------------+---------------+
| timestamp                 | granularity |         value |
+---------------------------+-------------+---------------+
| 2020-11-20T17:05:00+09:00 |       300.0 | 10739318784.0 |
+---------------------------+-------------+---------------+
関連コンテンツ