OpenStack Xena : Ceilometer 利用方法 (Nova Compute)2021/11/25 |
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 | | Open vSwitch | | Libvirt | | Memcached httpd | | Neutron Server | | Nova Compute | | Keystone Glance | | OVN-Northd | | Open vSwitch | | Nova API | | Cinder Volume | | OVN Metadata Agent | | Cinder API | | iSCSI Target | | OVN-Controller | | | | Heat API/Engine | | Ceilometer Compute | | | | 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
# 最終行へ追記
[notifications]
notify_on_state_change = vm_and_task_state
[oslo_messaging_notifications]
driver = messagingv2
systemctl restart openstack-nova-compute |
[2] | 任意のユーザーでインスタンスを起動した場合に収集されるデータの表示例です。 |
# インスタンス起動 [cent@dlp ~(keystone)]$ openstack server list +--------------------------------------+-------------+---------+-------------------------------------+-----------------+----------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+-------------+---------+-------------------------------------+-----------------+----------+ | a6180855-77cf-476f-9f26-4fc79baa38c2 | CentOS-St-8 | SHUTOFF | private=10.0.0.250, 192.168.100.108 | CentOS-Stream-8 | m1.small | +--------------------------------------+-------------+---------+-------------------------------------+-----------------+----------+
[cent@dlp ~(keystone)]$
openstack server start CentOS-St-8
# リソース一覧を表示 # インスタンスで一定の操作をしたのちにデータが取得される [cent@dlp ~(keystone)]$ openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | a6180855-77cf-476f-9f26-4fc79baa38c2 | instance | 2decda8bcd724687a1cf05064ab21fdf | 5624383f-677b-598e-a43b-4eb1a1cb5afd | instance_disk | 2decda8bcd724687a1cf05064ab21fdf | d83f7af1-8e5c-52a0-b151-0a0ee0978e9a | instance_network_interface | 2decda8bcd724687a1cf05064ab21fdf +--------------------------------------+----------------------------+---------------------------------- +----------------------------------+----------------------------------------------------------------------- | user_id | original_resource_id +----------------------------------+----------------------------------------------------------------------- | 6a517543654044e8b4ea9e0eea0adaa4 | a6180855-77cf-476f-9f26-4fc79baa38c2 | 6a517543654044e8b4ea9e0eea0adaa4 | a6180855-77cf-476f-9f26-4fc79baa38c2-vda | 6a517543654044e8b4ea9e0eea0adaa4 | instance-00000001-a6180855-77cf-476f-9f26-4fc79baa38c2-tap869ae812-24 +----------------------------------+----------------------------------------------------------------------- +----------------------------------+----------+----------------------------------+-------------- | started_at | ended_at | revision_start | revision_end +----------------------------------+----------+----------------------------------+-------------- | 2021-11-25T05:59:57.103029+00:00 | None | 2021-11-25T05:59:57.103038+00:00 | None | 2021-11-25T06:06:07.513744+00:00 | None | 2021-11-25T06:06:07.513750+00:00 | None | 2021-11-25T06:06:07.515009+00:00 | None | 2021-11-25T06:06:07.515019+00:00 | None +----------------------------------+----------+----------------------------------+-------------- +-------------------------------------------------------------------+ | creator | +-------------------------------------------------------------------+ | 1bbca96b926645e18c83df974aafc98f:7e53ef14eb894f379ea1929f5defc949 | | 1bbca96b926645e18c83df974aafc98f:7e53ef14eb894f379ea1929f5defc949 | | 1bbca96b926645e18c83df974aafc98f:7e53ef14eb894f379ea1929f5defc949 | +-------------------------------------------------------------------+ # [instance] リソース詳細 [cent@dlp ~(keystone)]$ openstack metric resource show a6180855-77cf-476f-9f26-4fc79baa38c2 +-----------------------+-------------------------------------------------------------------+ | Field | Value | +-----------------------+-------------------------------------------------------------------+ | created_by_project_id | 7e53ef14eb894f379ea1929f5defc949 | | created_by_user_id | 1bbca96b926645e18c83df974aafc98f | | creator | 1bbca96b926645e18c83df974aafc98f:7e53ef14eb894f379ea1929f5defc949 | | ended_at | None | | id | a6180855-77cf-476f-9f26-4fc79baa38c2 | | metrics | cpu: 8b9d70e9-83de-492c-b97f-74d5fc03b124 | | | disk.ephemeral.size: 51139e5f-8679-45d2-8010-e618a911d2f8 | | | disk.root.size: 923bd80c-03d2-4170-9fa1-f02baa279abf | | | memory.usage: f49fc5d0-1bad-4355-9f77-7db389aa1657 | | | memory: d1de92d6-b61e-41f4-8f29-6ace6f5e4ace | | | vcpus: 713d8767-b00c-4b7d-8d34-7f0b6d408cd0 | | original_resource_id | a6180855-77cf-476f-9f26-4fc79baa38c2 | | project_id | 2decda8bcd724687a1cf05064ab21fdf | | revision_end | None | | revision_start | 2021-11-25T05:59:57.103038+00:00 | | started_at | 2021-11-25T05:59:57.103029+00:00 | | type | instance | | user_id | 6a517543654044e8b4ea9e0eea0adaa4 | +-----------------------+-------------------------------------------------------------------+ # CPU [cent@dlp ~(keystone)]$ openstack metric measures show 8b9d70e9-83de-492c-b97f-74d5fc03b124 +---------------------------+-------------+---------------+ | timestamp | granularity | value | +---------------------------+-------------+---------------+ | 2021-11-25T15:05:00+09:00 | 300.0 | 93010000000.0 | +---------------------------+-------------+---------------+ # メモリー使用 [cent@dlp ~(keystone)]$ openstack metric measures show f49fc5d0-1bad-4355-9f77-7db389aa1657 +---------------------------+-------------+--------------+ | timestamp | granularity | value | +---------------------------+-------------+--------------+ | 2021-11-25T15:05:00+09:00 | 300.0 | 334.23828125 | +---------------------------+-------------+--------------+ # [instance_network_interface] リソース詳細 [cent@dlp ~(keystone)]$ openstack metric resource show d83f7af1-8e5c-52a0-b151-0a0ee0978e9a +-----------------------+-----------------------------------------------------------------------+ | Field | Value | +-----------------------+-----------------------------------------------------------------------+ | created_by_project_id | 7e53ef14eb894f379ea1929f5defc949 | | created_by_user_id | 1bbca96b926645e18c83df974aafc98f | | creator | 1bbca96b926645e18c83df974aafc98f:7e53ef14eb894f379ea1929f5defc949 | | ended_at | None | | id | d83f7af1-8e5c-52a0-b151-0a0ee0978e9a | | metrics | network.incoming.bytes: 3ac560e7-6f94-4735-aa85-902dccec7ac2 | | | network.incoming.packets: ab1f4097-cf7d-4a54-b09b-e2a3ef5e560d | | | network.outgoing.bytes: 7343718b-4a29-4a6b-a46f-198476ea6afd | | | network.outgoing.packets: c069d8a0-2370-4253-8a3f-6d98c860b957 | | original_resource_id | instance-00000001-a6180855-77cf-476f-9f26-4fc79baa38c2-tap869ae812-24 | | project_id | 2decda8bcd724687a1cf05064ab21fdf | | revision_end | None | | revision_start | 2021-11-25T06:06:07.515019+00:00 | | started_at | 2021-11-25T06:06:07.515009+00:00 | | type | instance_network_interface | | user_id | 6a517543654044e8b4ea9e0eea0adaa4 | +-----------------------+-----------------------------------------------------------------------+ # ネットワーク インカミング バイト [cent@dlp ~(keystone)]$ openstack metric measures show 3ac560e7-6f94-4735-aa85-902dccec7ac2 +---------------------------+-------------+---------+ | timestamp | granularity | value | +---------------------------+-------------+---------+ | 2021-11-25T15:05:00+09:00 | 300.0 | 52335.0 | +---------------------------+-------------+---------+ # ネットワーク アウトゴーイング バイト [cent@dlp ~(keystone)]$ openstack metric measures show 7343718b-4a29-4a6b-a46f-198476ea6afd +---------------------------+-------------+---------+ | timestamp | granularity | value | +---------------------------+-------------+---------+ | 2021-11-25T15:05:00+09:00 | 300.0 | 93443.0 | +---------------------------+-------------+---------+ |
Sponsored Link |
|